Fixes in slugify function and router tests
This commit is contained in:
parent
fd88fff9d2
commit
3f22c5c267
3 changed files with 14 additions and 3 deletions
|
|
@ -78,7 +78,7 @@ class Utils {
|
|||
|
||||
if (empty($text)) {
|
||||
|
||||
return 'n-a';
|
||||
return '';
|
||||
|
||||
}else {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,17 @@ function controller($switch='') {
|
|||
|
||||
if(PhangoModule\Admin\login()) {
|
||||
|
||||
if($switch=='') {
|
||||
|
||||
echo View::load_view(['title' => 'Admin', 'content' => ''], 'dashboard');
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
//Include module admin.
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class RouterTest extends TestCase {
|
|||
|
||||
public function testGetGoodController() {
|
||||
|
||||
$path_info='/welcome/index/good';
|
||||
$path_info='/welcome/app/good';
|
||||
|
||||
$this->assertEquals('All things are good!', \PhangoApp\PhaRouter\get_route($path_info));
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ class RouterTest extends TestCase {
|
|||
|
||||
$this->assertEquals([], \PhangoApp\PhaRouter\filter_path('/'));
|
||||
|
||||
$this->assertEquals([1 => 'nono-d'], \PhangoApp\PhaRouter\filter_path('/ñoño“ħˀð¶€'));
|
||||
$this->assertEquals([1 => 'nonohdEUR'], \PhangoApp\PhaRouter\filter_path('/ñoño“ħˀð¶€'));
|
||||
|
||||
$this->assertEquals([1 => 'nono', 2 => 'sucks'], \PhangoApp\PhaRouter\filter_path('/ñoño/sucks'));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue