mercredi 2 décembre 2015

Codeception tests fail with cleanup

I have unit tests, that add records to database, my assertions looks like:

...
$this->upService->addActivity($activity, $participation, $competition); //adding records
$this->tester->seeInDatabase('table', ['value' => 2000]);
$this->tester->seeInDatabase('table2', ['saldo' => '10.101']);
}

I have configured Db module, Phalcon2 module and sql dump. Test passes with configuration:

populate: false
cleanup: false

But there stay test records in databse, so I use:

populate: false
cleanup: true

But in this case, test fails and database stay clear. Hot to fix it?

Aucun commentaire:

Enregistrer un commentaire