Ignore:
Timestamp:
Sep 4, 2010, 8:54:34 PM (11 years ago)
Author:
teymour
Message:

Un vrai fichier de commands (protégé)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/test/unit/solrableTest.php

    r1312 r1316  
    44 
    55new 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);
    137
    148$s = new SolrConnector();
    15 //$s->deleteAll();
    169
    1710$i = new Intervention();
     
    3831$s->updateFromCommands();
    3932$a = $s->search("salut id:$id");
    40 print_r($a);
    4133$t->is($a['response']['docs'][0]['id'], $id, "L'intervention retournée sur des mots reindexés");
    4234
     
    5042$a = $s->search("ooghe id:$id");
    5143$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");
    5346$t->is($a['response']['docs'][0]['id'], $id, "Le parlementaire avec des fautes");
     47*/
    5448
    5549$q = new QuestionEcrite();
     
    6761
    6862
    69 $a = Doctrine::getTable('Amendement')->find(2);
     63$a = Doctrine::getTable('Amendement')->find(3);
    7064$a->save();
    7165$s->updateFromCommands();
     
    7468$r = $s->search("id:$id");
    7569$t->is(count($r['response']['docs']), 1, "L'amendement a été ajoutée");
    76 $s->deleteLuceneRecord($a);
     70$s->deleteLuceneRecord($id);
     71$s->updateFromCommands();
    7772$r = $s->search("id:$id");
    7873$t->is(count($r['response']['docs']), 0, "L'amendement a été supprimé dans lucene");
     
    8075$id = "Intervention/".$i->id;
    8176$i->delete();
     77$s->updateFromCommands();
    8278$r = $s->search("id:$id");
    8379$t->is(count($r['response']['docs']), 0, "L'intervention a été supprimée");
     
    8581$id = "Parlementaire/".$p->id;
    8682$p->delete();
     83$s->updateFromCommands();
    8784$r = $s->search("id:$id");
    8885$t->is(count($r['response']['docs']), 0, "Le parlementaire a été supprimée");
     
    9087$id = "QuestionEcrite/".$q->id;
    9188$q->delete();
     89$s->updateFromCommands();
    9290$r = $s->search("id:$id");
    9391$t->is(count($r['response']['docs']), 0, "La question ecrite a été supprimée");
Note: See TracChangeset for help on using the changeset viewer.