mercredi 13 mai 2020

How to save test result in a session?

Hello guys I'm writing tests. And i dont know how to save result of first test in session. For example i add user. My first test is passed. But when it comes to second test its failed, beacuse he cant find user Peter. And thats why i need to save it. Please guy help me, im beginner at this. And sorry for my english! Thanks a lot! Hope you understand my question

public function testAddUser()
    {
        \App::$domain->***->***->AddUser('Peter');
    }
public function testGivePresent()
    {
        \App::$domain->***->***->GivePresent('Peter', 'gift');
    }

if Im doing like that its okay, my test is ok

public function testAll()
    {
        \App::$domain->***->***->Addser('Peter');
        \App::$domain->***->***->GivePresent('Peter', 'gift');
    }

Aucun commentaire:

Enregistrer un commentaire