aboutsummaryrefslogtreecommitdiff
path: root/engine/tests
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-02-25 17:54:15 -0800
committerBrett Profitt <brett.profitt@gmail.com>2012-02-25 17:54:15 -0800
commitd62d625541025dc7ca8ab75d138339442a96f4ba (patch)
treefbc5d2a7dfcbb77dbeda7706db854b1fd5e7e119 /engine/tests
parent217e79eaeb51587943376f0a1bfc68c3586af46e (diff)
downloadelgg-d62d625541025dc7ca8ab75d138339442a96f4ba.tar.gz
elgg-d62d625541025dc7ca8ab75d138339442a96f4ba.tar.bz2
Fixes #3210. Keeping -s in URL friendly titles.
Diffstat (limited to 'engine/tests')
-rw-r--r--engine/tests/regression/trac_bugs.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/engine/tests/regression/trac_bugs.php b/engine/tests/regression/trac_bugs.php
index 99cf81774..26a45ab6a 100644
--- a/engine/tests/regression/trac_bugs.php
+++ b/engine/tests/regression/trac_bugs.php
@@ -199,4 +199,22 @@ class ElggCoreRegressionBugsTest extends ElggCoreUnitTest {
$this->assertFalse($result);
$this->assertEqual(array(), $DB_DELAYED_QUERIES);
}
+
+ /**
+ * http://trac.elgg.org/ticket/3210 - Don't remove -s in friendly titles
+ * @todo: http://trac.elgg.org/ticket/2276 - improve char encoding
+ */
+ public function test_friendly_title() {
+ $cases = array(
+ 'Simple Test' => 'simple-test',
+ 'Test top-level page' => 'test-top-level-page',
+// 'éclair' => 'éclair',
+// 'English, Español, and 日本語' => 'english-español-and-日本語'
+ );
+
+ foreach ($cases as $case => $expected) {
+ $friendly_title = elgg_get_friendly_title($case);
+ $this->assertIdentical($expected, $friendly_title);
+ }
+ }
}