public function setUp() {
$this->_path = $path = Libraries::get(true, 'resources') . '/tmp/tests';
$this->skipIf(!is_writable($this->_path), "{$this->_path} is not writable.");
$this->adapter = new Code(compact('path'));
$file = "{$this->_path}/a.php";
$data = <<<'EOD'
<?php
$t('simple 1');
$t('options 1', null, array('locale' => 'en'));
$t('replace 1 {:a}', array('a' => 'b'));
$t($test['invalid']);
$t(32203);
$t('invalid 1', $test['invalid']);
$t('invalid 2', 32203);
$t('invalid 3', 'invalid 3b');
$t('escaping\n1');
$t("escaping\n2");
$t("escaping\r\n3");
$t('escaping
4');
$tn('singular simple 1', 'plural simple 1', 3);
$tn('singular simple 2', 'plural simple 2');
$t('mixed 1');
$tn('mixed 1', 'plural mixed 1', 3);
$t('mixed 2');
$tn('mixed 2', 'plural mixed 2', 3);
$t('mixed 2');
$t('plural mixed 2');
?>
EOD;
file_put_contents($file, $data);
$file = "{$this->_path}/a.html.php";
$data = <<<'EOD'
<?=$t('simple 1 short'); ?>
<?=$tn('singular simple 1 short', 'plural simple 1 short', 3); ?>
EOD;
file_put_contents($file, $data);
}