mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
fix folder name
This commit is contained in:
48
src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php
Normal file
48
src/Bundle/ChillMainBundle/Tests/Util/CountriesInfoTest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Tests\Util;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Chill\MainBundle\Util\CountriesInfo;
|
||||
|
||||
/**
|
||||
* tests for CountriesInfos
|
||||
*
|
||||
* @author julien.fastre@champs-libre.coop
|
||||
*/
|
||||
class CountriesInfoTest extends TestCase {
|
||||
|
||||
public function testGetCountryData()
|
||||
{
|
||||
$raw = CountriesInfo::getCountriesData();
|
||||
|
||||
$this->assertStringStartsWith("AS AF AFG 004 Afghanistan, Islamic Republic of",
|
||||
$raw);
|
||||
}
|
||||
|
||||
public function testGetArrayCountriesData()
|
||||
{
|
||||
$data = CountriesInfo::getArrayCountriesData();
|
||||
|
||||
$this->assertNotNull($data);
|
||||
$this->assertContains(array(
|
||||
"AS", "AF", "AFG", "004", "Afghanistan, Islamic Republic of"
|
||||
), $data);
|
||||
}
|
||||
|
||||
public function testGetCountryCodeByContinents()
|
||||
{
|
||||
$countries = CountriesInfo::getCountriesCodeByContinent('EU');
|
||||
|
||||
$this->assertContains('BE', $countries);
|
||||
$this->assertContains('FR', $countries);
|
||||
$this->assertContains('GB', $countries);
|
||||
}
|
||||
|
||||
public function getGetContinentsCodes()
|
||||
{
|
||||
$continents = CountriesInfo::getContinentsCodes();
|
||||
|
||||
$this->assertContains('EU', $continents);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user