object = new searchEngine_options(); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ public function tearDown() { } /** * */ public function testSet_locale() { $locale = 'BABA'; $this->object->set_locale($locale); $this->assertEquals($locale, $this->object->get_locale()); } /** * * @todo Implement testGet_locale(). */ public function testGet_locale() { $locale = null; $this->object->set_locale($locale); $this->assertEquals($locale, $this->object->get_locale()); } /** * * @todo Implement testSet_sort(). */ public function testSet_sort() { $by = 'NAME'; $sort = 'ASC'; $this->object->set_sort($by, $sort); $this->assertEquals($by, $this->object->get_sortby()); $this->assertEquals($sort, $this->object->get_sortord()); $this->object->set_sort($by); $this->assertEquals($by, $this->object->get_sortby()); $this->assertEquals(searchEngine_options::SORT_MODE_DESC, $this->object->get_sortord()); } /** * * @todo Implement testGet_sortby(). */ public function testGet_sortby() { $by = 'NAME'; $sort = 'DESC'; $this->object->set_sort($by, $sort); $this->assertEquals($by, $this->object->get_sortby()); $this->assertEquals($sort, $this->object->get_sortord()); } /** * * @todo Implement testGet_sortord(). */ public function testGet_sortord() { $by = 'NAME'; $sort = 'DESC'; $this->object->set_sort($by, $sort); $this->assertEquals($by, $this->object->get_sortby()); $this->assertEquals($sort, $this->object->get_sortord()); } /** * * @todo Implement testSet_use_stemming(). */ public function testSet_use_stemming() { $bool = true; $this->object->set_use_stemming($bool); $this->assertEquals($bool, $this->object->get_use_stemming()); $bool = false; $this->object->set_use_stemming($bool); $this->assertEquals($bool, $this->object->get_use_stemming()); } /** * * @todo Implement testGet_use_stemming(). */ public function testGet_use_stemming() { $bool = true; $this->object->set_use_stemming($bool); $this->assertEquals($bool, $this->object->get_use_stemming()); $bool = false; $this->object->set_use_stemming($bool); $this->assertEquals($bool, $this->object->get_use_stemming()); } /** * * @todo Implement testSet_search_type(). */ public function testSet_search_type() { $type = "caca"; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_RECORD, $this->object->get_search_type()); $type = searchEngine_options::RECORD_RECORD; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_RECORD, $this->object->get_search_type()); $type = searchEngine_options::RECORD_GROUPING; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_GROUPING, $this->object->get_search_type()); } /** * * @todo Implement testGet_search_type(). */ public function testGet_search_type() { $type = "caca"; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_RECORD, $this->object->get_search_type()); $type = searchEngine_options::RECORD_RECORD; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_RECORD, $this->object->get_search_type()); $type = searchEngine_options::RECORD_GROUPING; $this->object->set_search_type($type); $this->assertEquals(searchEngine_options::RECORD_GROUPING, $this->object->get_search_type()); } /** * * @todo Implement testSet_bases(). */ public function testSet_bases() { $bases = array_keys(self::$user->ACL()->get_granted_base()); $this->object->set_bases($bases, self::$user->ACL()); $this->assertEquals(array_values($bases), array_values($this->object->get_bases())); } /** * * @todo Implement testGet_bases(). */ public function testGet_bases() { $bases = array_keys(self::$user->ACL()->get_granted_base()); $this->object->set_bases($bases, self::$user->ACL()); $this->assertEquals(array_values($bases), array_values($this->object->get_bases())); } /** * * @todo Implement testSet_fields(). */ public function testSet_fields() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_fields(). */ public function testGet_fields() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSet_status(). */ public function testSet_status() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_status(). */ public function testGet_status() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSet_record_type(). */ public function testSet_record_type() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_record_type(). */ public function testGet_record_type() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSet_min_date(). */ public function testSet_min_date() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_min_date(). */ public function testGet_min_date() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSet_max_date(). */ public function testSet_max_date() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_max_date(). */ public function testGet_max_date() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSet_date_fields(). */ public function testSet_date_fields() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testGet_date_fields(). */ public function testGet_date_fields() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * * @todo Implement testSerialize(). */ public function testSerialize() { $bases = array_keys(self::$user->ACL()->get_granted_base()); $this->object->set_bases($bases, self::$user->ACL()); $this->object->set_date_fields(array()); $this->object->set_locale('fr_FR'); $this->object->set_max_date(null); $this->object->set_min_date(null); $this->object->set_record_type(searchEngine_options::TYPE_AUDIO); $this->object->set_search_type(searchEngine_options::RECORD_RECORD); $this->object->set_sort('Name','DESC'); $this->object->set_status(array()); $this->object->set_use_stemming(true); $this->assertEquals($this->object, unserialize(serialize($this->object))); } /** * * @todo Implement testUnserialize(). */ public function testUnserialize() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } } ?>