for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of dispositif/wikibot application
* 2019 © Philippe M. <[email protected]>
* For the full copyright and MIT license information, please view the LICENSE file.
*/
declare(strict_types=1);
namespace App\Domain\Enums;
use PHPUnit\Framework\TestCase;
class LanguageTest extends TestCase
{
* @dataProvider provideAll2wiki
public function testAll2wiki($langStr, $expected)
$this::assertSame(
$expected,
Language::all2wiki($langStr)
);
}
public function provideAll2wiki(): array
return [
['fr', 'fr'],
['FR', 'fr'],
// iso
['dan', 'da'],
['DAN', 'da'],
['aav', null],
['coréen', 'ko'],
['anglais', 'en'],
['ANGLAIS', 'en'],
['English', 'en'],
['english', 'en'],
['ENGLISH', 'en'],
['Afrikaans', 'af'],
];