diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-12 13:02:36 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-12 13:02:36 +0100 |
commit | 1409f1c89a7ca01456ae2dcd6357d296e2b99f5a (patch) | |
tree | ffa30a9358e82d27be75d8fc5e57f3c8820dc6d3 /tests/legacy/LegacyUpdaterTest.php | |
parent | 054e03f37fa29da8066f1a637919f13c7e7dc5d2 (diff) | |
parent | a6935feb22df8d9634189ee87d257da9f03eedbd (diff) | |
download | Shaarli-0.12.1.tar.gz Shaarli-0.12.1.tar.zst Shaarli-0.12.1.zip |
Diffstat (limited to 'tests/legacy/LegacyUpdaterTest.php')
-rw-r--r-- | tests/legacy/LegacyUpdaterTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/legacy/LegacyUpdaterTest.php b/tests/legacy/LegacyUpdaterTest.php index f7391b86..395dd4b7 100644 --- a/tests/legacy/LegacyUpdaterTest.php +++ b/tests/legacy/LegacyUpdaterTest.php | |||
@@ -51,10 +51,10 @@ class LegacyUpdaterTest extends \Shaarli\TestCase | |||
51 | */ | 51 | */ |
52 | public function testReadEmptyUpdatesFile() | 52 | public function testReadEmptyUpdatesFile() |
53 | { | 53 | { |
54 | $this->assertEquals(array(), UpdaterUtils::read_updates_file('')); | 54 | $this->assertEquals(array(), UpdaterUtils::readUpdatesFile('')); |
55 | $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; | 55 | $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; |
56 | touch($updatesFile); | 56 | touch($updatesFile); |
57 | $this->assertEquals(array(), UpdaterUtils::read_updates_file($updatesFile)); | 57 | $this->assertEquals(array(), UpdaterUtils::readUpdatesFile($updatesFile)); |
58 | unlink($updatesFile); | 58 | unlink($updatesFile); |
59 | } | 59 | } |
60 | 60 | ||
@@ -66,14 +66,14 @@ class LegacyUpdaterTest extends \Shaarli\TestCase | |||
66 | $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; | 66 | $updatesFile = $this->conf->get('resource.data_dir') . '/updates.txt'; |
67 | $updatesMethods = array('m1', 'm2', 'm3'); | 67 | $updatesMethods = array('m1', 'm2', 'm3'); |
68 | 68 | ||
69 | UpdaterUtils::write_updates_file($updatesFile, $updatesMethods); | 69 | UpdaterUtils::writeUpdatesFile($updatesFile, $updatesMethods); |
70 | $readMethods = UpdaterUtils::read_updates_file($updatesFile); | 70 | $readMethods = UpdaterUtils::readUpdatesFile($updatesFile); |
71 | $this->assertEquals($readMethods, $updatesMethods); | 71 | $this->assertEquals($readMethods, $updatesMethods); |
72 | 72 | ||
73 | // Update | 73 | // Update |
74 | $updatesMethods[] = 'm4'; | 74 | $updatesMethods[] = 'm4'; |
75 | UpdaterUtils::write_updates_file($updatesFile, $updatesMethods); | 75 | UpdaterUtils::writeUpdatesFile($updatesFile, $updatesMethods); |
76 | $readMethods = UpdaterUtils::read_updates_file($updatesFile); | 76 | $readMethods = UpdaterUtils::readUpdatesFile($updatesFile); |
77 | $this->assertEquals($readMethods, $updatesMethods); | 77 | $this->assertEquals($readMethods, $updatesMethods); |
78 | unlink($updatesFile); | 78 | unlink($updatesFile); |
79 | } | 79 | } |
@@ -86,7 +86,7 @@ class LegacyUpdaterTest extends \Shaarli\TestCase | |||
86 | $this->expectException(\Exception::class); | 86 | $this->expectException(\Exception::class); |
87 | $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/'); | 87 | $this->expectExceptionMessageRegExp('/Updates file path is not set(.*)/'); |
88 | 88 | ||
89 | UpdaterUtils::write_updates_file('', array('test')); | 89 | UpdaterUtils::writeUpdatesFile('', array('test')); |
90 | } | 90 | } |
91 | 91 | ||
92 | /** | 92 | /** |
@@ -101,7 +101,7 @@ class LegacyUpdaterTest extends \Shaarli\TestCase | |||
101 | touch($updatesFile); | 101 | touch($updatesFile); |
102 | chmod($updatesFile, 0444); | 102 | chmod($updatesFile, 0444); |
103 | try { | 103 | try { |
104 | @UpdaterUtils::write_updates_file($updatesFile, array('test')); | 104 | @UpdaterUtils::writeUpdatesFile($updatesFile, array('test')); |
105 | } catch (Exception $e) { | 105 | } catch (Exception $e) { |
106 | unlink($updatesFile); | 106 | unlink($updatesFile); |
107 | throw $e; | 107 | throw $e; |