Updated default links from 'http' to 'https' (#3229)

* Updated default links from 'http' to 'https'
* Updated unit test
This commit is contained in:
jaas666 2022-02-21 10:20:37 -06:00 committed by GitHub
parent 3c16d7ec37
commit 74a4ab64b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -305,9 +305,9 @@ function yourls_initialize_options() {
* @return bool
*/
function yourls_insert_sample_links() {
$link1 = yourls_add_new_link( 'http://blog.yourls.org/', 'yourlsblog', 'YOURLS\' Blog' );
$link2 = yourls_add_new_link( 'http://yourls.org/', 'yourls', 'YOURLS: Your Own URL Shortener' );
$link3 = yourls_add_new_link( 'http://ozh.org/', 'ozh', 'ozh.org' );
$link1 = yourls_add_new_link( 'https://blog.yourls.org/', 'yourlsblog', 'YOURLS\' Blog' );
$link2 = yourls_add_new_link( 'https://yourls.org/', 'yourls', 'YOURLS: Your Own URL Shortener' );
$link3 = yourls_add_new_link( 'https://ozh.org/', 'ozh', 'ozh.org' );
return ( bool ) (
$link1['status'] == 'success'
& $link2['status'] == 'success'

View File

@ -25,7 +25,7 @@ class ShortURL_Misc_Tests extends PHPUnit\Framework\TestCase {
}
public function test_url_exists() {
$exists = yourls_long_url_exists( 'http://ozh.org/' );
$exists = yourls_long_url_exists( 'https://ozh.org/' );
$this->assertEquals( 'ozh', $exists->keyword );
$this->assertNull( yourls_long_url_exists( rand_str() ) );
}