1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8require_once __DIR__ . '/../../language/Language.php';
9
10/**
11 * Test class for Language.
12 * Generated by PHPUnit on 2010-08-05 at 10:04:14.
13 */
14class LanguageTest extends TikiTestCase
15{
16	public function testAddPhpSlashes()
17	{
18		$string = "\n \t \r " . '\\ $ "';
19		$expectedResult = '\n \t \r \\\\ \$ \"';
20		$this->assertEquals($expectedResult, Language::addPhpSlashes($string));
21	}
22
23	public function testRemovePhpSlashes()
24	{
25		$string = '\n \t \r \\\\ \$ \"';
26		$expectedResult = "\n \t \r " . '\\ $ "';
27		$this->assertEquals($expectedResult, Language::removePhpSlashes($string));
28	}
29
30	// TODO: We need a way to create a Tiki database just for the tests
31	/*public function testGetDbTranslatedLanguages() {
32	}*/
33}
34