for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CodeIgniterGetText\Tests;
class LibraryTest extends \PHPUnit_Framework_TestCase
{
private function _regex($expression, $successful = TRUE)
$log = ($successful ? 'info' : 'debug');
$regex = '/(' . $log . '|).*(' . $expression . ')/';
return ($regex);
}
public function testCatalogCodeset()
$this->expectOutputRegex($this->_regex('bind text domain code set'));
$this->_library();
public function testLocaleDir()
$this->expectOutputRegex($this->_regex('bind text domain directory'));
public function testTextDomain()
$this->expectOutputRegex($this->_regex('set text domain'));
public function testLocale()
$this->expectOutputRegex($this->_regex('set locale'));
public function testEnvironmentLanguage()
$this->expectOutputRegex($this->_regex('set environment language'));
public function testFileExists()
$this->expectOutputRegex($this->_regex('check MO file exists'));
private function _library()
$config = array();
// Load default config array
require(realpath(dirname(__FILE__) . '/../') . '/src/config/gettext.php');
\Gettext::init($config);