Laravel version update
Laravel version update
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Translation\Tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Translation\PluralizationRules;
|
||||
|
||||
/**
|
||||
@@ -26,7 +27,7 @@ use Symfony\Component\Translation\PluralizationRules;
|
||||
*
|
||||
* @author Clemens Tolboom clemens@build2be.nl
|
||||
*/
|
||||
class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
|
||||
class PluralizationRulesTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* We test failed langcode here.
|
||||
@@ -64,7 +65,6 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
|
||||
array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')),
|
||||
array('3', array('be', 'bs', 'cs', 'hr')),
|
||||
array('4', array('cy', 'mt', 'sl')),
|
||||
array('5', array()),
|
||||
array('6', array('ar')),
|
||||
);
|
||||
}
|
||||
@@ -85,15 +85,14 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
|
||||
array('3', array('cbs')),
|
||||
array('4', array('gd', 'kw')),
|
||||
array('5', array('ga')),
|
||||
array('6', array()),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* We validate only on the plural coverage. Thus the real rules is not tested.
|
||||
*
|
||||
* @param string $nplural plural expected
|
||||
* @param array $matrix containing langcodes and their plural index values
|
||||
* @param string $nplural Plural expected
|
||||
* @param array $matrix Containing langcodes and their plural index values
|
||||
* @param bool $expectSuccess
|
||||
*/
|
||||
protected function validateMatrix($nplural, $matrix, $expectSuccess = true)
|
||||
@@ -101,9 +100,9 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase
|
||||
foreach ($matrix as $langCode => $data) {
|
||||
$indexes = array_flip($data);
|
||||
if ($expectSuccess) {
|
||||
$this->assertEquals($nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms.");
|
||||
$this->assertEquals($nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms.");
|
||||
} else {
|
||||
$this->assertNotEquals((int) $nplural, count($indexes), "Langcode '$langCode' has '$nplural' plural forms.");
|
||||
$this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user