2011-07-02 13:31:26 +03:00
|
|
|
<?php
|
|
|
|
|
2011-07-20 21:12:17 +03:00
|
|
|
require_once dirname(__FILE__) . '/../../Library/NCLNameCaseUa.php';
|
2011-07-02 13:31:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
class NCLNameCaseUaTest extends PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var NCLNameCaseRu
|
|
|
|
*/
|
|
|
|
protected $object;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
|
|
* This method is called before a test is executed.
|
|
|
|
*/
|
|
|
|
protected function setUp()
|
|
|
|
{
|
|
|
|
$this->object = new NCLNameCaseUa;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
|
|
* This method is called after a test is executed.
|
|
|
|
*/
|
|
|
|
protected function tearDown()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function testSplDetect0()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Олександрович', trim($this->object->getFullNameFormat('Олександрович')).'-Олександрович');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect1()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Миколайович', trim($this->object->getFullNameFormat('Миколайович')).'-Миколайович');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect2()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Кузьмич', trim($this->object->getFullNameFormat('Кузьмич')).'-Кузьмич');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect3()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Петрович', trim($this->object->getFullNameFormat('Петрович')).'-Петрович');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect4()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Ілліч', trim($this->object->getFullNameFormat('Ілліч')).'-Ілліч');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect5()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Василівна', trim($this->object->getFullNameFormat('Василівна')).'-Василівна');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect6()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Антонівна', trim($this->object->getFullNameFormat('Антонівна')).'-Антонівна');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
public function testSplDetect7()
|
|
|
|
{
|
2011-07-10 11:38:29 +03:00
|
|
|
$this->assertEquals('F-Яківна', trim($this->object->getFullNameFormat('Яківна')).'-Яківна');
|
2011-07-02 13:31:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|