diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2016-10-21 11:04:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-21 11:04:52 +0200 |
commit | 3d5e0aede31e07f060e3ca470d36374c54d5040c (patch) | |
tree | 77d08b9ea6d45946c21a55b5389cb66ba2e887cd /tests/LinkDBTest.php | |
parent | 954dc2446caade6ccad3ffd1173ef139c1f36ad3 (diff) | |
parent | 735ed4a94e1da5874195ac47c00612043a193edf (diff) | |
download | Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.tar.gz Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.tar.zst Shaarli-3d5e0aede31e07f060e3ca470d36374c54d5040c.zip |
Merge pull request #673 from virtualtam/cleanup/linkdb
LinkDB: code cleanup
Diffstat (limited to 'tests/LinkDBTest.php')
-rw-r--r-- | tests/LinkDBTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index 31306069..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)); |