mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,48 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Tests\Util;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Chill\MainBundle\Util\CountriesInfo;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* tests for CountriesInfos
|
||||
* tests for CountriesInfos.
|
||||
*
|
||||
* @author julien.fastre@champs-libre.coop
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class CountriesInfoTest extends TestCase {
|
||||
|
||||
public function testGetCountryData()
|
||||
class CountriesInfoTest extends TestCase
|
||||
{
|
||||
public function getGetContinentsCodes()
|
||||
{
|
||||
$raw = CountriesInfo::getCountriesData();
|
||||
|
||||
$this->assertStringStartsWith("AS AF AFG 004 Afghanistan, Islamic Republic of",
|
||||
$raw);
|
||||
$continents = CountriesInfo::getContinentsCodes();
|
||||
|
||||
$this->assertContains('EU', $continents);
|
||||
}
|
||||
|
||||
public function testGetArrayCountriesData()
|
||||
|
||||
public function testGetArrayCountriesData()
|
||||
{
|
||||
$data = CountriesInfo::getArrayCountriesData();
|
||||
|
||||
|
||||
$this->assertNotNull($data);
|
||||
$this->assertContains(array(
|
||||
"AS", "AF", "AFG", "004", "Afghanistan, Islamic Republic of"
|
||||
), $data);
|
||||
$this->assertContains([
|
||||
'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()
|
||||
|
||||
public function testGetCountryData()
|
||||
{
|
||||
$continents = CountriesInfo::getContinentsCodes();
|
||||
|
||||
$this->assertContains('EU', $continents);
|
||||
$raw = CountriesInfo::getCountriesData();
|
||||
|
||||
$this->assertStringStartsWith(
|
||||
'AS AF AFG 004 Afghanistan, Islamic Republic of',
|
||||
$raw
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user