]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge remote-tracking branch 'ArthurHoaro/default-links'
authornodiscc <nodiscc@gmail.com>
Fri, 26 Jun 2015 20:03:25 +0000 (22:03 +0200)
committernodiscc <nodiscc@gmail.com>
Fri, 26 Jun 2015 20:03:25 +0000 (22:03 +0200)
application/LinkDB.php
tests/LinkDBTest.php

index ff82446f0d7a892c63d04d5231cdf0e74b12ccce..a673b086b056d45231d3a41e565eb2b6dc026192 100644 (file)
@@ -188,11 +188,15 @@ class LinkDB implements Iterator, Countable, ArrayAccess
         // Create a dummy database for example
         $this->links = array();
         $link = array(
-            'title'=>'Shaarli - sebsauvage.net',
-            'url'=>'http://sebsauvage.net/wiki/doku.php?id=php:shaarli',
-            'description'=>'Welcome to Shaarli! This is a bookmark. To edit or delete me, you must first login.',
+            'title'=>' Shaarli: the personal, minimalist, super-fast, no-database delicious clone',
+            'url'=>'https://github.com/shaarli/Shaarli/wiki',
+            'description'=>'Welcome to Shaarli! This is your first public bookmark. To edit or delete me, you must first login.
+
+To learn how to use Shaarli, consult the link "Help/documentation" at the bottom of this page.
+
+You use the community supported version of the original Shaarli project, by Sebastien Sauvage.',
             'private'=>0,
-            'linkdate'=>'20110914_190000',
+            'linkdate'=> date('Ymd_His'),
             'tags'=>'opensource software'
         );
         $this->links[$link['linkdate']] = $link;
@@ -200,9 +204,9 @@ class LinkDB implements Iterator, Countable, ArrayAccess
         $link = array(
             'title'=>'My secret stuff... - Pastebin.com',
             'url'=>'http://sebsauvage.net/paste/?8434b27936c09649#bR7XsXhoTiLcqCpQbmOpBi3rq2zzQUC5hBI7ZT1O3x8=',
-            'description'=>'SShhhh!!  I\'m a private link only YOU can see. You can delete me too.',
+            'description'=>'Shhhh! I\'m a private link only YOU can see. You can delete me too.',
             'private'=>1,
-            'linkdate'=>'20110914_074522',
+            'linkdate'=> date('Ymd_His', strtotime('-1 minute')),
             'tags'=>'secretstuff'
         );
         $this->links[$link['linkdate']] = $link;
index 0d3433597adf2bfe1508ce04fb22b0910e752861..a54fc501caca0d3f6b3f17efc660bae65aec493e 100644 (file)
@@ -15,7 +15,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
 {
     // datastore to test write operations
     protected static $testDatastore = 'tests/datastore.php';
-    protected static $dummyDatastoreSHA1 = 'e3edea8ea7bb50be4bcb404df53fbb4546a7156e';
+    protected static $dummyDatastoreFilesize = 759;
     protected static $refDB = null;
     protected static $publicLinkDB = null;
     protected static $privateLinkDB = null;
@@ -110,8 +110,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
 
         // ensure the correct data has been written
         $this->assertEquals(
-            self::$dummyDatastoreSHA1,
-            sha1_file(self::$testDatastore)
+            self::$dummyDatastoreFilesize,
+            filesize(self::$testDatastore)
         );
     }
 
@@ -122,8 +122,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
     {
         $linkDB = new LinkDB(self::$testDatastore, false, false);
         $this->assertEquals(
-            self::$dummyDatastoreSHA1,
-            sha1_file(self::$testDatastore)
+            self::$dummyDatastoreFilesize,
+            filesize(self::$testDatastore)
         );
 
         $checkDB = self::getMethod('checkDB');
@@ -131,8 +131,8 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
 
         // ensure the datastore is left unmodified
         $this->assertEquals(
-            self::$dummyDatastoreSHA1,
-            sha1_file(self::$testDatastore)
+            self::$dummyDatastoreFilesize,
+            filesize(self::$testDatastore)
         );
     }