-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from josantonius/release/v2.0.2
Release/v2.0.2
- Loading branch information
Showing
9 changed files
with
76 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Josantonius\LanguageCode; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Josantonius\LanguageCode; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
* This file is part of https://github.com/josantonius/php-language-code repository. | ||
* | ||
* (c) Josantonius <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @phpcs:disable PSR1.Methods.CamelCapsMethodName.NotCamelCaps | ||
*/ | ||
|
||
namespace Josantonius\LanguageCode\Tests; | ||
|
||
|
@@ -27,35 +29,35 @@ public function setUp(): void | |
$this->languageCode = new LanguageCode(); | ||
} | ||
|
||
public function testShouldGetAllLanguageCodes(): void | ||
public function test_should_get_all_language_codes(): void | ||
{ | ||
$this->assertNotEmpty($this->languageCode->all()); | ||
|
||
$this->assertNotEmpty($this->collection->all()); | ||
} | ||
|
||
public function testShouldGetLanguageCodeFromLanguageName(): void | ||
public function test_should_get_language_code_from_language_name(): void | ||
{ | ||
$this->assertSame('es', $this->languageCode->getCode('Spanish')); | ||
|
||
$this->assertSame('es', $this->collection->getCode('Spanish')); | ||
} | ||
|
||
public function testShouldReturnNullWithUnknownLanguageName(): void | ||
public function test_should_return_null_with_unknown_language_name(): void | ||
{ | ||
$this->assertNull($this->languageCode->getCode('foo')); | ||
|
||
$this->assertNull($this->collection->getCode('foo')); | ||
} | ||
|
||
public function testShouldGetLanguageNameFromLanguageCode(): void | ||
public function test_should_get_language_name_from_language_code(): void | ||
{ | ||
$this->assertSame('Spanish', $this->languageCode->getName('es')); | ||
|
||
$this->assertSame('Spanish', $this->collection->getName('es')); | ||
} | ||
|
||
public function testShouldReturnNullWithUnknownLanguageCode(): void | ||
public function test_should_return_null_with_unknown_language_code(): void | ||
{ | ||
$this->assertNull($this->languageCode->getName('bar')); | ||
|
||
|