for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PhpMyAdmin\MoTranslator\Tests;
use PhpMyAdmin\MoTranslator\Translator;
use PHPUnit\Framework\TestCase;
/**
* Test for translator API
*/
class TranslatorTest extends TestCase
{
* Test on empty gettext
public function testGettext(): void
$translator = new Translator('');
$this->assertEquals('Test', $translator->gettext('Test'));
}
public function testSetTranslation(): void
$translator->setTranslation('Test', 'Translation');
$this->assertEquals('Translation', $translator->gettext('Test'));