Changeset 1316 for cpc/trunk/project/test/unit/solrableTest.php
- Timestamp:
- Sep 4, 2010, 8:54:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/test/unit/solrableTest.php
r1312 r1316 4 4 5 5 new sfDatabaseManager(ProjectConfiguration::getApplicationConfiguration('frontend', 'test', true)); 6 $t = new lime_test(14, new lime_output_color()); 7 8 /* MaJ Rapide pour test sur intervention courtes 9 foreach(array('303216', '42266', '191828', '303217', '42284', '110633', '111801', '148718', '152067', '168027', '247354', '259956', '348273', '213423', '87153') as $id) { 10 Doctrine::getTable('Intervention')->find($id)->save(); 11 } 12 */ 6 $t = new lime_test(13); 13 7 14 8 $s = new SolrConnector(); 15 //$s->deleteAll();16 9 17 10 $i = new Intervention(); … … 38 31 $s->updateFromCommands(); 39 32 $a = $s->search("salut id:$id"); 40 print_r($a);41 33 $t->is($a['response']['docs'][0]['id'], $id, "L'intervention retournée sur des mots reindexés"); 42 34 … … 50 42 $a = $s->search("ooghe id:$id"); 51 43 $t->is($a['response']['docs'][0]['id'], $id, "Le parlementaire est trouvable"); 52 $a = $s->search("oogue object_name:Parlementaire"); 44 /* 45 $a = $s->search("oghe object_name:Parlementaire"); 53 46 $t->is($a['response']['docs'][0]['id'], $id, "Le parlementaire avec des fautes"); 47 */ 54 48 55 49 $q = new QuestionEcrite(); … … 67 61 68 62 69 $a = Doctrine::getTable('Amendement')->find( 2);63 $a = Doctrine::getTable('Amendement')->find(3); 70 64 $a->save(); 71 65 $s->updateFromCommands(); … … 74 68 $r = $s->search("id:$id"); 75 69 $t->is(count($r['response']['docs']), 1, "L'amendement a été ajoutée"); 76 $s->deleteLuceneRecord($a); 70 $s->deleteLuceneRecord($id); 71 $s->updateFromCommands(); 77 72 $r = $s->search("id:$id"); 78 73 $t->is(count($r['response']['docs']), 0, "L'amendement a été supprimé dans lucene"); … … 80 75 $id = "Intervention/".$i->id; 81 76 $i->delete(); 77 $s->updateFromCommands(); 82 78 $r = $s->search("id:$id"); 83 79 $t->is(count($r['response']['docs']), 0, "L'intervention a été supprimée"); … … 85 81 $id = "Parlementaire/".$p->id; 86 82 $p->delete(); 83 $s->updateFromCommands(); 87 84 $r = $s->search("id:$id"); 88 85 $t->is(count($r['response']['docs']), 0, "Le parlementaire a été supprimée"); … … 90 87 $id = "QuestionEcrite/".$q->id; 91 88 $q->delete(); 89 $s->updateFromCommands(); 92 90 $r = $s->search("id:$id"); 93 91 $t->is(count($r['response']['docs']), 0, "La question ecrite a été supprimée");
Note: See TracChangeset
for help on using the changeset viewer.