summaryrefslogtreecommitdiff
path: root/tests/autoprepend.t
blob: e91996f06b7ab83dbb645d43c7998b359b377164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/www/server/bin/php -qC
<?php

require "searchlib/search_test.class";

it_text::init();
$GLOBALS['it_text']->statictext = array(
	'_' => array("de" => "Deutsch", "en" => "English"),
	'foo' => array("de" => "bar {v1}", "en" => "qux {v1}"),
);

is(
	T('foo'),
	"bar {v1}",
	"simple T()",
);

is(
	T('foo', 'en'),
	"qux {v1}",
	"simple T() with language",
);

is(
	T('foo', 'v1' => "gna<bber"),
	"bar gna&lt;bber",
	"T() with quoted values",
);

is(
	T('foo', 'v1' => "gna<bber", 'en'),
	"qux gna&lt;bber",
	"T() with with quoted values and language",
);

is(
	T('foo', 'en', 'v1' => "gna<bber"),
	"qux gna&lt;bber",
	"T() with with language and quoted values",
);