aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/netscape
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-29 11:36:27 +0200
committerGitHub <noreply@github.com>2020-09-29 11:36:27 +0200
commit6cdca9562c7685e9a0eb77b51584d0cc458c44e0 (patch)
tree518de2057da549d0baa982c6aa689aa813377774 /tests/netscape
parentd0ae1ba273b6decea8d35ef79bfabb055b0fb6df (diff)
parentb1baca99f280570d0336b4d71ad1f9dca213a35b (diff)
downloadShaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.tar.gz
Shaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.tar.zst
Shaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.zip
Merge pull request #1572 from ArthurHoaro/feature/php8
Diffstat (limited to 'tests/netscape')
-rw-r--r--tests/netscape/BookmarkExportTest.php5
-rw-r--r--tests/netscape/BookmarkImportTest.php8
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/netscape/BookmarkExportTest.php b/tests/netscape/BookmarkExportTest.php
index 509da51d..a6eacae4 100644
--- a/tests/netscape/BookmarkExportTest.php
+++ b/tests/netscape/BookmarkExportTest.php
@@ -54,7 +54,7 @@ class BookmarkExportTest extends TestCase
54 /** 54 /**
55 * Instantiate reference data 55 * Instantiate reference data
56 */ 56 */
57 public static function setUpBeforeClass() 57 public static function setUpBeforeClass(): void
58 { 58 {
59 static::$conf = new ConfigManager('tests/utils/config/configJson'); 59 static::$conf = new ConfigManager('tests/utils/config/configJson');
60 static::$conf->set('resource.datastore', static::$testDatastore); 60 static::$conf->set('resource.datastore', static::$testDatastore);
@@ -78,10 +78,11 @@ class BookmarkExportTest extends TestCase
78 /** 78 /**
79 * Attempt to export an invalid link selection 79 * Attempt to export an invalid link selection
80 * @expectedException Exception 80 * @expectedException Exception
81 * @expectedExceptionMessageRegExp /Invalid export selection/
82 */ 81 */
83 public function testFilterAndFormatInvalid() 82 public function testFilterAndFormatInvalid()
84 { 83 {
84 $this->expectExceptionMessageRegExp('/Invalid export selection/');
85
85 $this->netscapeBookmarkUtils->filterAndFormat( 86 $this->netscapeBookmarkUtils->filterAndFormat(
86 self::$formatter, 87 self::$formatter,
87 'derp', 88 'derp',
diff --git a/tests/netscape/BookmarkImportTest.php b/tests/netscape/BookmarkImportTest.php
index f678e26b..89ae4aa7 100644
--- a/tests/netscape/BookmarkImportTest.php
+++ b/tests/netscape/BookmarkImportTest.php
@@ -75,7 +75,7 @@ class BookmarkImportTest extends TestCase
75 */ 75 */
76 protected static $defaultTimeZone; 76 protected static $defaultTimeZone;
77 77
78 public static function setUpBeforeClass() 78 public static function setUpBeforeClass(): void
79 { 79 {
80 self::$defaultTimeZone = date_default_timezone_get(); 80 self::$defaultTimeZone = date_default_timezone_get();
81 // Timezone without DST for test consistency 81 // Timezone without DST for test consistency
@@ -85,7 +85,7 @@ class BookmarkImportTest extends TestCase
85 /** 85 /**
86 * Resets test data before each test 86 * Resets test data before each test
87 */ 87 */
88 protected function setUp() 88 protected function setUp(): void
89 { 89 {
90 if (file_exists(self::$testDatastore)) { 90 if (file_exists(self::$testDatastore)) {
91 unlink(self::$testDatastore); 91 unlink(self::$testDatastore);
@@ -104,12 +104,12 @@ class BookmarkImportTest extends TestCase
104 /** 104 /**
105 * Delete history file. 105 * Delete history file.
106 */ 106 */
107 public function tearDown() 107 protected function tearDown(): void
108 { 108 {
109 @unlink(self::$historyFilePath); 109 @unlink(self::$historyFilePath);
110 } 110 }
111 111
112 public static function tearDownAfterClass() 112 public static function tearDownAfterClass(): void
113 { 113 {
114 date_default_timezone_set(self::$defaultTimeZone); 114 date_default_timezone_set(self::$defaultTimeZone);
115 } 115 }