Skip to content

Commit

Permalink
tweak: rename test case class
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jul 29, 2024
1 parent 48e6a93 commit b0662ae
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Gt\Config\Config;
use Gt\Config\ConfigSection;

class ConfigTest extends TestCase {
class ConfigConfigTest extends ConfigTestCase {
public function testNotPresentByDefault() {
$config = new Config();
$this->assertNull($config->get(uniqid()));
Expand Down Expand Up @@ -66,4 +66,4 @@ public function testTypeSafeGetter() {
self::assertEquals("April 5th 1988", $dateTime->format("F jS Y"));
self::assertNull($sut->getFloat("nothing-here"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Gt\Config\ConfigFactory;
use Gt\Config\Test\Helper\Helper;

class ConfigFactoryTest extends TestCase {
class ConfigFactoryConfigTest extends ConfigTestCase {
public function testCreateForProject():void {
$filePath = implode(DIRECTORY_SEPARATOR, [
$this->tmp,
Expand Down Expand Up @@ -52,4 +52,4 @@ public function testCreateFromPathName():void {
self::assertContains("database", $sectionNames);
self::assertNotContains("extra", $sectionNames);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Gt\Config\ConfigSection;
use BadMethodCallException;

class ConfigSectionTest extends TestCase {
class ConfigSectionConfigTest extends ConfigTestCase {
public function testGet() {
$data = [
"name" => "unit test",
Expand Down Expand Up @@ -86,4 +86,4 @@ public function testWith() {
self::assertNull($sutOriginal->get("added"));
self::assertEquals("new value", $sut->get("added"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Gt\Config\Test\Helper\Helper;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

class TestCase extends PHPUnitTestCase {
class ConfigTestCase extends PHPUnitTestCase {
protected $tmp;

protected function setUp():void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Gt\Config\FileWriter;
use Gt\Config\Test\Helper\Helper;

class FileWriterTest extends TestCase {
class FileWriterConfigTest extends ConfigTestCase {
public function testWrite():void {
$sectionValues = [
"one" => [
Expand Down Expand Up @@ -50,4 +50,4 @@ public function testWrite():void {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Gt\Config\Generator;
use Gt\Config\InvalidArgumentException;

class GeneratorTest extends TestCase {
class GeneratorConfigTest extends ConfigTestCase {
public function testGenerateEmptyArgs() {
self::expectException(InvalidArgumentException::class);
self::expectExceptionMessage("Not enough arguments supplied");
Expand Down Expand Up @@ -50,4 +50,4 @@ public function testGenerate() {
self::assertStringContainsString("[testsection]", $contents);
self::assertStringContainsString("testkey = \"testvalue\"", $contents);
}
}
}

0 comments on commit b0662ae

Please sign in to comment.