经过phpunit测试后,如何从数据库中删除数据

时间:2019-12-30 13:00:03

标签: phpunit-testing

我是phpunit的新手。任何人都可以解释一下如何从数据库(Innodb)中删除测试数据

use PHPUnit\Framework\TestCase as TestCase;
use Model\Nationality\NationalityModel as NationalityModel;
class XSCNationalityModelTest extends TestCase
{
    private $NationalityModelObj;

    protected function setUp()
    {
        $this->NationalityModelObj = new NationalityModel();
    }
    /**
    *@test
    *
    */
    public function it_test_nationality_is_added_or_not()
    {
        $this->NationalityModelObj->AddNationality("Germany");
    }

 }

0 个答案:

没有答案