I want to test specific testClass in my project since there are a lot of test class that's failure and I just want to test one Class at a time.
I've created the test Class in following folder \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));
}
}
so I've tried this follwing command but none of this works :
phpunit "repositories\AppVersionTest"
. => Cannot open file "test/repositories/AppVersionTest.php"phpunit "test\repositories\AppVersionTest"
. => Cannot open file "test/repositories/AppVersionTest.php"phpunit --filter "repositories\AppVersionTest"
. => No tests executed!phpunit --testsuite "repositories\AppVersionTest"
. => No tests executed!