Skip to content

Commit

Permalink
list() with keys
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Nov 14, 2019
1 parent 9f1a694 commit 151ad71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/PhpScannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testPhpCodeScanner()

$scanner->scanFile($file);

list($domain1, $domain2, $domain3) = array_values($scanner->getTranslations());
list('domain1' => $domain1, 'domain2' => $domain2, 'domain3' => $domain3) = $scanner->getTranslations();

$this->assertCount(6, $domain1);
$this->assertCount(4, $domain2);
Expand All @@ -44,7 +44,7 @@ public function testInvalidFunction()
$scanner = new PhpScanner(Translations::create('messages'));
$scanner->scanString('<?php __(ucfirst("invalid function"));', 'file.php');

list($translations) = array_values($scanner->getTranslations());
list('messages' => $translations) = array_values($scanner->getTranslations());

$this->assertCount(0, $translations);
}
Expand All @@ -55,7 +55,7 @@ public function testIgnoredInvalidFunction()
$scanner->ignoreInvalidFunctions();
$scanner->scanString('<?php __(ucfirst("invalid function"));', 'file.php');

list($translations) = array_values($scanner->getTranslations());
list('messages' => $translations) = $scanner->getTranslations();

$this->assertCount(0, $translations);
}
Expand Down

0 comments on commit 151ad71

Please sign in to comment.