我想在我的项目中测试特定的 testClass,因为有很多测试类是失败的,我只想一次测试一个 Class。
我已经在以下文件夹 \test\repositories\ApplicationVersionFormat.php
中创建了测试类:
<?php
use App\Repositories\ApplicationVersionFormat;
class ApplicationVersionFormatTest extends \TestCase
{
public function testValidFormat()
{
$version = '1.2.3';
$appVersion = new ApplicationVersionFormat();
$this->assertEquals(true,$appVersion->isValidVersion($version));
}
public function testInvalidFormat()
{
$version = '11.2.3';
$appVersion = new ApplicationVersionFormat();
$this->assertEquals(false,$appVersion->isValidVersion($version));
}
public function testInvalidFormat2()
{
$version = '1.22.3';
$appVersion = new ApplicationVersionFormat();
$this->assertEquals(false,$appVersion->isValidVersion($version));
}
public function testInvalidFormat3()
{
$version = '1.2.33';
$appVersion = new ApplicationVersionFormat();
$this->assertEquals(false,$appVersion->isValidVersion($version));
}
public function testInvalidFormat4()
{
$version = '11.22.33';
$appVersion = new ApplicationVersionFormat();
$this->assertEquals(false,$appVersion->isValidVersion($version));
}
}
所以我尝试了下面的命令,但是没有一个奏效:
有人帮忙吗? 谢谢