diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/LinkDBTest.php | 8 | ||||
-rw-r--r-- | tests/utils/ReferenceLinkDB.php | 2 |
2 files changed, 5 insertions, 5 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)); |
diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index 937961c8..abca4656 100644 --- a/tests/utils/ReferenceLinkDB.php +++ b/tests/utils/ReferenceLinkDB.php | |||
@@ -13,7 +13,7 @@ class ReferenceLinkDB | |||
13 | /** | 13 | /** |
14 | * Populates the test DB with reference data | 14 | * Populates the test DB with reference data |
15 | */ | 15 | */ |
16 | function __construct() | 16 | public function __construct() |
17 | { | 17 | { |
18 | $this->addLink( | 18 | $this->addLink( |
19 | 'Link title: @website', | 19 | 'Link title: @website', |