Skip to content

Commit

Permalink
🧱 Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nbourguig committed May 12, 2024
1 parent 3a67922 commit 00743f5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tests/Unit/PusherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
use Nikaia\TranslationSheet\Translation\Reader;
use Nikaia\TranslationSheet\Sheet\TranslationsSheet;
use Nikaia\TranslationSheet\Translation\Transformer;
use PHPUnit\Framework\Attributes\Test;

class PusherTest extends TestCase
{
/** @test */
#[Test]
public function it_pushes_translations()
{
$transformer = Mockery::mock(Transformer::class);
Expand Down
5 changes: 4 additions & 1 deletion tests/Unit/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public function it_reads_translations_correctly()
$this->assertEquals('1.0', $item->value);
}

/** @test : https://github.com/nikaia/translation-sheet/pull/31 */
/**
* @see https://github.com/nikaia/translation-sheet/pull/31
*/
#[Test]
public function it_scans_all_directories_even_after_encountring_vendor()
{
$this->helper->createLangFiles('en', 'app', ['title' => 'Awesome']);
Expand Down
7 changes: 4 additions & 3 deletions tests/Unit/TransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
use Nikaia\TranslationSheet\Spreadsheet;
use Nikaia\TranslationSheet\Test\TestCase;
use Nikaia\TranslationSheet\Translation\Transformer;
use PHPUnit\Framework\Attributes\Test;

class TransformerTest extends TestCase
{
/** @test */
#[Test]
public function it_transforms_read_translations_correctly()
{
$translations = $this->helper->readTranslations();
Expand All @@ -17,9 +18,9 @@ public function it_transforms_read_translations_correctly()
->setTranslationsSheet(Spreadsheet::primaryTranslationSheet())
->transform($translations);

$this->assertEquals($transformed->toArray(), [
$this->assertEquals([
['app.title', 'Awesome', 'Super', '', 'app', 'title', '{locale}/app.php'],
['package::backend.version', '', '1.0', 'package', 'backend', 'version', 'vendor/package/{locale}/backend.php'],
]);
], $transformed->toArray());
}
}

0 comments on commit 00743f5

Please sign in to comment.