aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/LinkDBTest.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-10-20 21:19:51 +0200
committerVirtualTam <virtualtam@flibidi.net>2016-10-20 21:33:40 +0200
commitf21abf329234ae4d5a1d56c5a9dd0bc11f80bac8 (patch)
tree452d965ce383fde4672ecd1ac5613e38c57623cb /tests/LinkDBTest.php
parent628b97cbdf276785eb9ff4f7a124e81e67d2f76c (diff)
downloadShaarli-f21abf329234ae4d5a1d56c5a9dd0bc11f80bac8.tar.gz
Shaarli-f21abf329234ae4d5a1d56c5a9dd0bc11f80bac8.tar.zst
Shaarli-f21abf329234ae4d5a1d56c5a9dd0bc11f80bac8.zip
LinkDB: update datastore method names
Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r--tests/LinkDBTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php
index 43652e72..9d79386c 100644
--- a/tests/LinkDBTest.php
+++ b/tests/LinkDBTest.php
@@ -117,7 +117,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
117 unlink(self::$testDatastore); 117 unlink(self::$testDatastore);
118 $this->assertFileNotExists(self::$testDatastore); 118 $this->assertFileNotExists(self::$testDatastore);
119 119
120 $checkDB = self::getMethod('checkDB'); 120 $checkDB = self::getMethod('check');
121 $checkDB->invokeArgs($linkDB, array()); 121 $checkDB->invokeArgs($linkDB, array());
122 $this->assertFileExists(self::$testDatastore); 122 $this->assertFileExists(self::$testDatastore);
123 123
@@ -134,7 +134,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
134 $datastoreSize = filesize(self::$testDatastore); 134 $datastoreSize = filesize(self::$testDatastore);
135 $this->assertGreaterThan(0, $datastoreSize); 135 $this->assertGreaterThan(0, $datastoreSize);
136 136
137 $checkDB = self::getMethod('checkDB'); 137 $checkDB = self::getMethod('check');
138 $checkDB->invokeArgs($linkDB, array()); 138 $checkDB->invokeArgs($linkDB, array());
139 139
140 // ensure the datastore is left unmodified 140 // ensure the datastore is left unmodified
@@ -180,7 +180,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
180 /** 180 /**
181 * Save the links to the DB 181 * Save the links to the DB
182 */ 182 */
183 public function testSaveDB() 183 public function testSave()
184 { 184 {
185 $testDB = new LinkDB(self::$testDatastore, true, false); 185 $testDB = new LinkDB(self::$testDatastore, true, false);
186 $dbSize = sizeof($testDB); 186 $dbSize = sizeof($testDB);
@@ -194,7 +194,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
194 'tags'=>'unit test' 194 'tags'=>'unit test'
195 ); 195 );
196 $testDB[$link['linkdate']] = $link; 196 $testDB[$link['linkdate']] = $link;
197 $testDB->savedb('tests'); 197 $testDB->save('tests');
198 198
199 $testDB = new LinkDB(self::$testDatastore, true, false); 199 $testDB = new LinkDB(self::$testDatastore, true, false);
200 $this->assertEquals($dbSize + 1, sizeof($testDB)); 200 $this->assertEquals($dbSize + 1, sizeof($testDB));