cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -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
);
}
}