* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\Tests\Collator; use Symfony\Component\Intl\Collator\Collator; use Symfony\Component\Intl\Globals\IntlGlobals; class CollatorTest extends AbstractCollatorTest { /** * @expectedException \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException */ public function testConstructorWithUnsupportedLocale() { new Collator('pt_BR'); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testCompare() { $collator = $this->getCollator('en'); $collator->compare('a', 'b'); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testGetAttribute() { $collator = $this->getCollator('en'); $collator->getAttribute(Collator::NUMERIC_COLLATION); } public function testGetErrorCode() { $collator = $this->getCollator('en'); $this->assertEquals(IntlGlobals::U_ZERO_ERROR, $collator->getErrorCode()); } public function testGetErrorMessage() { $collator = $this->getCollator('en'); $this->assertEquals('U_ZERO_ERROR', $collator->getErrorMessage()); } public function testGetLocale() { $collator = $this->getCollator('en'); $this->assertEquals('en', $collator->getLocale()); } public function testConstructWithoutLocale() { $collator = $this->getCollator(null); $this->assertInstanceOf('\Symfony\Component\Intl\Collator\Collator', $collator); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testGetSortKey() { $collator = $this->getCollator('en'); $collator->getSortKey('Hello'); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testGetStrength() { $collator = $this->getCollator('en'); $collator->getStrength(); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testSetAttribute() { $collator = $this->getCollator('en'); $collator->setAttribute(Collator::NUMERIC_COLLATION, Collator::ON); } /** * @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException */ public function testSetStrength() { $collator = $this->getCollator('en'); $collator->setStrength(Collator::PRIMARY); } public function testStaticCreate() { $collator = Collator::create('en'); $this->assertInstanceOf('\Symfony\Component\Intl\Collator\Collator', $collator); } protected function getCollator($locale) { return new Collator($locale); } } __halt_compiler();----SIGNATURE:----NjjLQzmd/0mrAueeto36VG+vqAdKAaR8in7OBMCG+Ga/gfDZI6SAKTU4clsCZYGhe+3MYPK4t+2/Zq7NqEZqYNlOGvLVQ9n8l5mzOPGJ373MFUlHpKiK9YSP7YKFyhpOZQd3dhlFyhsYh8rwR2Wcnw9zGpsvyhftA/k8tDBRir0LFh5uhFUXt+UrkO3BkPDZqsNsjM+Hj4kTQ37OImNgLwNqfxvftfseh189Y1Nu7TflOx1TuK19fHpVNKZ7ZyYbGhU+P+D6SqjXxgVLdrxXi5REtmbAdUzWRJFQnhWttmogLQxO6E0xGnkiNGmdhSN4NbVU26WdOjeTV1gCHDXamSKkdO+kd59iIr/wXsCCtOQXYhckm7GTjfVDR0ngr8J8s3g4uVKZ+EH1gBr4f0tEDY/g6lEaidrLrKaDK6x6t5Pf6FNnjt+uggSLAmNEjAX6vCIys0g9JOh464VIRT0F2Fkwo/whTyRS7I9q/Z9TQv+LaV77orG+U2iSQ7nwmqR4e6/NnJviPPw4lBXRp5xQMe2OmWghbI9nmUSBDRmAW0i8Ib5MztagviBTTaNQMMXO4R6PJ5imPfJvtrLCuD2VgouGhLxIsi+2tWxUbtESUhRdyCqGR5sXvuTuvjoF31SswQ6ePOOxVNAPKR6bT6P/+Pr8oa7slAbzirezx1NjqiE=----ATTACHMENT:----OTA5NDIwNDc2MjkyNjE2MSAyNjg4MTA4MzE0Njc3ODY1IDU1NTE3MzE4NTQ4MzMxNjc=