forked from YOURLS/YOURLS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move /pages into /user (YOURLS#2648)
Closes YOURLS#1582 * Move `pages/` into `user/` * Update functions to display pages * Add tests for pages * Update .gitignore and robots sample file Co-authored-by: Léo Colombaro <[email protected]>
- Loading branch information
Showing
10 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,5 @@ Disallow: /css | |
Disallow: /images | ||
Disallow: /includes | ||
Disallow: /js | ||
Disallow: /pages | ||
Disallow: /user | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
// | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
/** | ||
* Pages | ||
* | ||
* @group pages | ||
*/ | ||
|
||
class Pages_Tests extends PHPUnit_Framework_TestCase { | ||
|
||
public function test_page_is_reserved() { | ||
$this->assertTrue( yourls_keyword_is_reserved('examplepage') ); | ||
} | ||
|
||
public function test_create_page_and_check_is_reserved() { | ||
$page = rand_str(); | ||
if( touch(YOURLS_PAGEDIR . "/$page.php") ) { | ||
$this->assertTrue( yourls_keyword_is_reserved($page) ); | ||
unlink(YOURLS_PAGEDIR . "/$page.php"); | ||
} else { | ||
$this->markTestSkipped( "Cannot create 'pages/$page'" ); | ||
} | ||
} | ||
|
||
} |
File renamed without changes.
File renamed without changes.