Skip to content

Commit

Permalink
Added a test to warn that the test suite is invalid against a non-emp…
Browse files Browse the repository at this point in the history
…ty default ini
  • Loading branch information
ben-xo committed May 16, 2023
1 parent 178c977 commit 84ea3c2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/DefaultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public static function setUpBeforeClass(): void
exec('php dir2cast.php --output=out.xml', self::$output, self::$returncode);
}

public function test_default_dir2cast_ini_is_functionally_empty(): void
{
$ini_content = file_get_contents('./dir2cast.ini');
$this->assertGreaterThan(10000, strlen($ini_content), "ini file is unusually small. If you have edited it, some tests will fail.");
$ini_content = preg_replace("/^(;.*|\s*)\r\n/m", '', $ini_content);
$this->assertEquals("", $ini_content, "ini file is not the default. Some tests may fail.");
}

public function test_default_empty_podcast_creates_output(): void
{
$this->assertTrue(file_exists(self::$file));
Expand Down

0 comments on commit 84ea3c2

Please sign in to comment.