Skip to content

Commit aeb60d1

Browse files
committed
added tests for #136
1 parent 85238c4 commit aeb60d1

File tree

2 files changed

+134
-122
lines changed

2 files changed

+134
-122
lines changed

tests/AbstractTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected static function saveContent(Translations $translations, $file, $format
6666
file_put_contents($file, $translations->$method());
6767
}
6868

69-
protected function runTestFormat($file, $countTranslations, $countHeaders = 8)
69+
protected function runTestFormat($file, $countTranslations, $countTranslated = 0, $countHeaders = 8)
7070
{
7171
$format = basename($file);
7272
$method = "from{$format}File";
@@ -75,6 +75,7 @@ protected function runTestFormat($file, $countTranslations, $countHeaders = 8)
7575

7676
$this->assertCount($countTranslations, $translations);
7777
$this->assertCount($countHeaders, $translations->getHeaders(), json_encode($translations->getHeaders(), JSON_PRETTY_PRINT));
78+
$this->assertSame($countTranslated, $translations->countTranslated());
7879
$this->assertContent($translations, $file);
7980
}
8081
}

0 commit comments

Comments
 (0)