Created
October 28, 2014 05:45
-
-
Save paulgibbs/77213ac6984e5ee19310 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/phpunit/testcases/routing/core.php b/tests/phpunit/testcases/routing/core.php | |
index 519411e..90ba0b5 100644 | |
--- a/tests/phpunit/testcases/routing/core.php | |
+++ b/tests/phpunit/testcases/routing/core.php | |
@@ -28,4 +28,21 @@ class BP_Tests_Routing_Core extends BP_UnitTestCase { | |
$this->assertArrayHasKey( 'activity', buddypress()->bp_nav ); | |
$this->assertArrayHasKey( 'profile', buddypress()->bp_nav ); | |
} | |
+ | |
+ public function test_case_insensitivity_of_router_slugs() { | |
+ $this->go_to( bp_get_root_domain() . '/' . strtoupper( bp_get_activity_root_slug() ) . '/' ); | |
+ $this->assertTrue( bp_is_activity_directory() ); | |
+ } | |
+ | |
+ public function test_case_insensitivity_of_urlencoded_router_slugs() { | |
+ $slug = '그룹전공서적'; | |
+ $url = bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . rawurlencode( $slug ) . '/'; | |
+ | |
+ $g = $this->factory->group->create( array( | |
+ 'slug' => sanitize_title( $slug ), | |
+ ) ); | |
+ | |
+ $this->go_to( $url ); | |
+ $this->assertTrue( bp_is_group() ); | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment