summaryrefslogtreecommitdiff
path: root/tests/app
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2022-03-13 18:56:30 +0000
committerGreg Roach <greg@subaqua.co.uk>2022-03-13 19:15:36 +0000
commitf01ab4ac305e1fac9efbeef65f5be51ced21e7a7 (patch)
tree13cfb1a95f55e4e12120738272933637f8a6820f /tests/app
parent9f37cd254b1a3e6bd44a0e3b12637fa6f632784c (diff)
downloadwebtrees-f01ab4ac305e1fac9efbeef65f5be51ced21e7a7.tar.gz
webtrees-f01ab4ac305e1fac9efbeef65f5be51ced21e7a7.tar.bz2
webtrees-f01ab4ac305e1fac9efbeef65f5be51ced21e7a7.zip
PHPunit assertions are static
Diffstat (limited to 'tests/app')
-rw-r--r--tests/app/Encodings/ASCIITest.php4
-rw-r--r--tests/app/Encodings/AnselTest.php2
-rw-r--r--tests/app/Encodings/CP437Test.php2
-rw-r--r--tests/app/Encodings/CP850Test.php2
-rw-r--r--tests/app/Encodings/ISO88591Test.php4
-rw-r--r--tests/app/Encodings/ISO88592Test.php4
-rw-r--r--tests/app/Encodings/UTF16BETest.php10
-rw-r--r--tests/app/Encodings/UTF16LETest.php10
-rw-r--r--tests/app/Encodings/Windows1250Test.php2
-rw-r--r--tests/app/Encodings/Windows1251Test.php2
-rw-r--r--tests/app/Encodings/Windows1252Test.php2
-rw-r--r--tests/app/Factories/CalendarDateFactoryTest.php138
-rw-r--r--tests/app/Factories/EncodingFactoryTest.php42
-rw-r--r--tests/app/Factories/MarkdownFactoryTest.php16
-rw-r--r--tests/app/Module/MapLinkBingTest.php2
-rw-r--r--tests/app/Module/MapLinkGoogleTest.php2
-rw-r--r--tests/app/Module/MapLinkOpenStreetMapTest.php2
-rw-r--r--tests/app/Reports/RightToLeftSupportTest.php132
-rw-r--r--tests/app/Services/GedcomEditServiceTest.php16
-rw-r--r--tests/app/Services/RateLimitServiceTest.php8
20 files changed, 201 insertions, 201 deletions
diff --git a/tests/app/Encodings/ASCIITest.php b/tests/app/Encodings/ASCIITest.php
index 5a3905f00e..9244f9be0b 100644
--- a/tests/app/Encodings/ASCIITest.php
+++ b/tests/app/Encodings/ASCIITest.php
@@ -47,7 +47,7 @@ class ASCIITest extends TestCase
$actual = $encoding->toUtf8($character);
$expected = iconv(ASCII::NAME, UTF8::NAME, $character);
- $this->assertSame($expected, $actual);
+ static::assertSame($expected, $actual);
}
foreach (range(128, 255) as $code_point) {
@@ -55,7 +55,7 @@ class ASCIITest extends TestCase
$actual = $encoding->toUtf8($character);
$expected = UTF8::REPLACEMENT_CHARACTER;
- $this->assertSame($expected, $actual);
+ static::assertSame($expected, $actual);
}
}
}
diff --git a/tests/app/Encodings/AnselTest.php b/tests/app/Encodings/AnselTest.php
index 34c81d5550..cc1a071a3c 100644
--- a/tests/app/Encodings/AnselTest.php
+++ b/tests/app/Encodings/AnselTest.php
@@ -158,7 +158,7 @@ class AnselTest extends TestCase
continue;
}
- $this->assertSame($utf8, $encoding->toUtf8($encoding->fromUtf8($utf8)), 'U+' . dechex($code));
+ static::assertSame($utf8, $encoding->toUtf8($encoding->fromUtf8($utf8)), 'U+' . dechex($code));
}
}
}
diff --git a/tests/app/Encodings/CP437Test.php b/tests/app/Encodings/CP437Test.php
index 7358e423b0..11689f5f64 100644
--- a/tests/app/Encodings/CP437Test.php
+++ b/tests/app/Encodings/CP437Test.php
@@ -48,7 +48,7 @@ class CP437Test extends TestCase
$actual = $encoding->toUtf8($character);
$expected = iconv(CP437::NAME, UTF8::NAME, $character);
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/CP850Test.php b/tests/app/Encodings/CP850Test.php
index 9b06694113..7e426ed78a 100644
--- a/tests/app/Encodings/CP850Test.php
+++ b/tests/app/Encodings/CP850Test.php
@@ -45,7 +45,7 @@ class CP850Test extends TestCase
$actual = $encoding->toUtf8($character);
$expected = iconv(CP850::NAME, UTF8::NAME, $character);
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/ISO88591Test.php b/tests/app/Encodings/ISO88591Test.php
index 30eaa6d07b..9450cc8211 100644
--- a/tests/app/Encodings/ISO88591Test.php
+++ b/tests/app/Encodings/ISO88591Test.php
@@ -53,7 +53,7 @@ class ISO88591Test extends TestCase
$character = chr($code_point);
$actual = $encoding->toUtf8($character);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, dechex($code_point) . '=>' . $actual);
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, dechex($code_point) . '=>' . $actual);
}
foreach ($ranges as $range) {
@@ -63,7 +63,7 @@ class ISO88591Test extends TestCase
$expected = iconv(ISO88591::NAME, UTF8::NAME, $character);
$expected = $expected === '' ? UTF8::REPLACEMENT_CHARACTER : $expected;
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/ISO88592Test.php b/tests/app/Encodings/ISO88592Test.php
index 6d36f78584..2990ead796 100644
--- a/tests/app/Encodings/ISO88592Test.php
+++ b/tests/app/Encodings/ISO88592Test.php
@@ -53,7 +53,7 @@ class ISO88592Test extends TestCase
$character = chr($code_point);
$actual = $encoding->toUtf8($character);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, dechex($code_point) . '=>' . $actual);
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, dechex($code_point) . '=>' . $actual);
}
foreach ($ranges as $range) {
@@ -63,7 +63,7 @@ class ISO88592Test extends TestCase
$expected = iconv(ISO88592::NAME, UTF8::NAME, $character);
$expected = $expected === '' ? UTF8::REPLACEMENT_CHARACTER : $expected;
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/UTF16BETest.php b/tests/app/Encodings/UTF16BETest.php
index 35927b60a3..89cf49dcc0 100644
--- a/tests/app/Encodings/UTF16BETest.php
+++ b/tests/app/Encodings/UTF16BETest.php
@@ -49,14 +49,14 @@ class UTF16BETest extends TestCase
$expected = iconv(UTF16BE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
foreach (range(0x80, 0xFF) as $code) {
$char = chr(intdiv($code, 256)) . chr($code % 256);
$actual = $encoding->toUtf8($char);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
}
foreach (range(0x100, 0xD7FF) as $code) {
@@ -64,14 +64,14 @@ class UTF16BETest extends TestCase
$expected = iconv(UTF16BE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
foreach (range(0xD800, 0xDFFF) as $code) {
$char = chr(intdiv($code, 256)) . chr($code % 256);
$actual = $encoding->toUtf8($char);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
}
foreach (range(0xE000, 0xFFFF) as $code) {
@@ -79,7 +79,7 @@ class UTF16BETest extends TestCase
$expected = iconv(UTF16BE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
}
}
diff --git a/tests/app/Encodings/UTF16LETest.php b/tests/app/Encodings/UTF16LETest.php
index 78dd6dea69..7254383084 100644
--- a/tests/app/Encodings/UTF16LETest.php
+++ b/tests/app/Encodings/UTF16LETest.php
@@ -49,14 +49,14 @@ class UTF16LETest extends TestCase
$expected = iconv(UTF16LE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
foreach (range(0x80, 0xFF) as $code) {
$char = chr($code % 256) . chr(intdiv($code, 256));
$actual = $encoding->toUtf8($char);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
}
foreach (range(0x100, 0xD7FF) as $code) {
@@ -64,14 +64,14 @@ class UTF16LETest extends TestCase
$expected = iconv(UTF16LE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
foreach (range(0xD800, 0xDFFF) as $code) {
$char = chr($code % 256) . chr(intdiv($code, 256));
$actual = $encoding->toUtf8($char);
- $this->assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
+ static::assertSame(UTF8::REPLACEMENT_CHARACTER, $actual, 'U+' . dechex($code));
}
foreach (range(0xE000, 0xFFFF) as $code) {
@@ -79,7 +79,7 @@ class UTF16LETest extends TestCase
$expected = iconv(UTF16LE::NAME, UTF8::NAME, $char);
$actual = $encoding->toUtf8($char);
- $this->assertSame($expected, $actual, 'U+' . dechex($code));
+ static::assertSame($expected, $actual, 'U+' . dechex($code));
}
}
}
diff --git a/tests/app/Encodings/Windows1250Test.php b/tests/app/Encodings/Windows1250Test.php
index 8708c6a46f..52242f370d 100644
--- a/tests/app/Encodings/Windows1250Test.php
+++ b/tests/app/Encodings/Windows1250Test.php
@@ -49,7 +49,7 @@ class Windows1250Test extends TestCase
$expected = iconv(Windows1250::NAME, 'UTF-8//IGNORE', $character);
$expected = $expected === '' ? UTF8::REPLACEMENT_CHARACTER : $expected;
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/Windows1251Test.php b/tests/app/Encodings/Windows1251Test.php
index ac850138c8..62dfde745a 100644
--- a/tests/app/Encodings/Windows1251Test.php
+++ b/tests/app/Encodings/Windows1251Test.php
@@ -49,7 +49,7 @@ class Windows1251Test extends TestCase
$expected = iconv(Windows1251::NAME, 'UTF-8//IGNORE', $character);
$expected = $expected === '' ? UTF8::REPLACEMENT_CHARACTER : $expected;
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Encodings/Windows1252Test.php b/tests/app/Encodings/Windows1252Test.php
index 590864e608..9b853ab30d 100644
--- a/tests/app/Encodings/Windows1252Test.php
+++ b/tests/app/Encodings/Windows1252Test.php
@@ -49,7 +49,7 @@ class Windows1252Test extends TestCase
$expected = iconv(Windows1252::NAME, 'UTF-8//IGNORE', $character);
$expected = $expected === '' ? UTF8::REPLACEMENT_CHARACTER : $expected;
- $this->assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
+ static::assertSame($expected, $actual, dechex($code_point) . '=>' . $actual . ' ' . $expected);
}
}
}
diff --git a/tests/app/Factories/CalendarDateFactoryTest.php b/tests/app/Factories/CalendarDateFactoryTest.php
index b64dbc9f6a..39ea674a9b 100644
--- a/tests/app/Factories/CalendarDateFactoryTest.php
+++ b/tests/app/Factories/CalendarDateFactoryTest.php
@@ -44,10 +44,10 @@ class CalendarDateFactoryTest extends TestCase
$date = $factory->make('');
- $this->assertSame(GregorianDate::ESCAPE, $date->format('%@'));
- $this->assertSame(0, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame(GregorianDate::ESCAPE, $date->format('%@'));
+ static::assertSame(0, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -69,10 +69,10 @@ class CalendarDateFactoryTest extends TestCase
foreach ($calendar_escapes as $calendar_escape) {
$date = $factory->make($calendar_escape);
- $this->assertSame($calendar_escape, $date->format('%@'));
- $this->assertSame(0, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame($calendar_escape, $date->format('%@'));
+ static::assertSame(0, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
}
@@ -84,10 +84,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DSTARDATE@');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(0, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(0, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -98,10 +98,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('01 JAN 1970');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1970, $date->year);
- $this->assertSame(1, $date->month);
- $this->assertSame(1, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1970, $date->year);
+ static::assertSame(1, $date->month);
+ static::assertSame(1, $date->day);
}
/**
@@ -112,10 +112,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('JAN 1970');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1970, $date->year);
- $this->assertSame(1, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1970, $date->year);
+ static::assertSame(1, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -126,10 +126,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('1970');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1970, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1970, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -140,10 +140,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('THE MID 1960S');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1960, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1960, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -154,10 +154,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('PERHAPS FEB OR MAR IN 1960 or 1961');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1960, $date->year);
- $this->assertSame(2, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1960, $date->year);
+ static::assertSame(2, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -168,10 +168,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('PERHAPS 11 OR 12 FEB OR MAR IN 1960 or 1961');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(1960, $date->year);
- $this->assertSame(2, $date->month);
- $this->assertSame(11, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(1960, $date->year);
+ static::assertSame(2, $date->month);
+ static::assertSame(11, $date->day);
}
/**
@@ -182,10 +182,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('PERHAPS FEB OR MAR');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(0, $date->year);
- $this->assertSame(2, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(0, $date->year);
+ static::assertSame(2, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -196,10 +196,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('PERHAPS 11 OR 12 FEB OR MAR');
- $this->assertSame('@#DGREGORIAN@', $date->format('%@'));
- $this->assertSame(0, $date->year);
- $this->assertSame(2, $date->month);
- $this->assertSame(11, $date->day);
+ static::assertSame('@#DGREGORIAN@', $date->format('%@'));
+ static::assertSame(0, $date->year);
+ static::assertSame(2, $date->month);
+ static::assertSame(11, $date->day);
}
/**
@@ -210,10 +210,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DGREGORIAN@ 10 NSN 5432');
- $this->assertSame('@#DHEBREW@', $date->format('%@'));
- $this->assertSame(5432, $date->year);
- $this->assertSame(8, $date->month);
- $this->assertSame(10, $date->day);
+ static::assertSame('@#DHEBREW@', $date->format('%@'));
+ static::assertSame(5432, $date->year);
+ static::assertSame(8, $date->month);
+ static::assertSame(10, $date->day);
}
/**
@@ -224,10 +224,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DGREGORIAN@ 10 PLUV 11');
- $this->assertSame('@#DFRENCH R@', $date->format('%@'));
- $this->assertSame(11, $date->year);
- $this->assertSame(5, $date->month);
- $this->assertSame(10, $date->day);
+ static::assertSame('@#DFRENCH R@', $date->format('%@'));
+ static::assertSame(11, $date->year);
+ static::assertSame(5, $date->month);
+ static::assertSame(10, $date->day);
}
/**
@@ -238,10 +238,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DGREGORIAN@ 10 SHAAB 1234');
- $this->assertSame('@#DHIJRI@', $date->format('%@'));
- $this->assertSame(1234, $date->year);
- $this->assertSame(8, $date->month);
- $this->assertSame(10, $date->day);
+ static::assertSame('@#DHIJRI@', $date->format('%@'));
+ static::assertSame(1234, $date->year);
+ static::assertSame(8, $date->month);
+ static::assertSame(10, $date->day);
}
/**
@@ -252,10 +252,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DGREGORIAN@ 10 BAHMA 1234');
- $this->assertSame('@#DJALALI@', $date->format('%@'));
- $this->assertSame(1234, $date->year);
- $this->assertSame(11, $date->month);
- $this->assertSame(10, $date->day);
+ static::assertSame('@#DJALALI@', $date->format('%@'));
+ static::assertSame(1234, $date->year);
+ static::assertSame(11, $date->month);
+ static::assertSame(10, $date->day);
}
/**
@@ -266,10 +266,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('@#DGREGORIAN@ 10 AUG 44 B.C.');
- $this->assertSame('@#DJULIAN@', $date->format('%@'));
- $this->assertSame(-44, $date->year);
- $this->assertSame(8, $date->month);
- $this->assertSame(10, $date->day);
+ static::assertSame('@#DJULIAN@', $date->format('%@'));
+ static::assertSame(-44, $date->year);
+ static::assertSame(8, $date->month);
+ static::assertSame(10, $date->day);
}
/**
@@ -280,10 +280,10 @@ class CalendarDateFactoryTest extends TestCase
$factory = new CalendarDateFactory();
$date = $factory->make('3456');
- $this->assertSame('@#DHEBREW@', $date->format('%@'));
- $this->assertSame(3456, $date->year);
- $this->assertSame(0, $date->month);
- $this->assertSame(0, $date->day);
+ static::assertSame('@#DHEBREW@', $date->format('%@'));
+ static::assertSame(3456, $date->year);
+ static::assertSame(0, $date->month);
+ static::assertSame(0, $date->day);
}
/**
@@ -295,6 +295,6 @@ class CalendarDateFactoryTest extends TestCase
$calendars = $factory->supportedCalendars();
- $this->assertIsArray($calendars);
+ static::assertIsArray($calendars);
}
}
diff --git a/tests/app/Factories/EncodingFactoryTest.php b/tests/app/Factories/EncodingFactoryTest.php
index 17db153e0e..d7dc07fac0 100644
--- a/tests/app/Factories/EncodingFactoryTest.php
+++ b/tests/app/Factories/EncodingFactoryTest.php
@@ -48,17 +48,17 @@ class EncodingFactoryTest extends TestCase
{
$factory = new EncodingFactory();
- $this->assertInstanceOf(
+ static::assertInstanceOf(
UTF8::class,
$factory->detect(UTF8::BYTE_ORDER_MARK)
);
- $this->assertInstanceOf(
+ static::assertInstanceOf(
UTF16BE::class,
$factory->detect(UTF16BE::BYTE_ORDER_MARK)
);
- $this->assertInstanceOf(
+ static::assertInstanceOf(
UTF16LE::class,
$factory->detect(UTF16LE::BYTE_ORDER_MARK)
);
@@ -71,12 +71,12 @@ class EncodingFactoryTest extends TestCase
{
$factory = new EncodingFactory();
- $this->assertInstanceOf(
+ static::assertInstanceOf(
UTF16BE::class,
$factory->detect("\x000")
);
- $this->assertInstanceOf(
+ static::assertInstanceOf(
UTF16LE::class,
$factory->detect("0\x00")
);
@@ -89,7 +89,7 @@ class EncodingFactoryTest extends TestCase
{
$factory = new EncodingFactory();
- $this->assertInstanceOf(
+ static::assertInstanceOf(
MacRoman::class,
$factory->detect("0 HEAD\n1 CHAR MACINTOSH\n0 TRLR")
);
@@ -102,17 +102,17 @@ class EncodingFactoryTest extends TestCase
{
$factory = new EncodingFactory();
- $this->assertInstanceOf(UTF8::class, $factory->make(UTF8::NAME));
- $this->assertInstanceOf(UTF16BE::class, $factory->make(UTF16BE::NAME));
- $this->assertInstanceOf(UTF16LE::class, $factory->make(UTF16LE::NAME));
- $this->assertInstanceOf(ANSEL::class, $factory->make(ANSEL::NAME));
- $this->assertInstanceOf(ASCII::class, $factory->make(ASCII::NAME));
- $this->assertInstanceOf(CP437::class, $factory->make(CP437::NAME));
- $this->assertInstanceOf(CP850::class, $factory->make(CP850::NAME));
- $this->assertInstanceOf(Windows1250::class, $factory->make(Windows1250::NAME));
- $this->assertInstanceOf(Windows1251::class, $factory->make(Windows1251::NAME));
- $this->assertInstanceOf(Windows1252::class, $factory->make(Windows1252::NAME));
- $this->assertInstanceOf(MacRoman::class, $factory->make(MacRoman::NAME));
+ static::assertInstanceOf(UTF8::class, $factory->make(UTF8::NAME));
+ static::assertInstanceOf(UTF16BE::class, $factory->make(UTF16BE::NAME));
+ static::assertInstanceOf(UTF16LE::class, $factory->make(UTF16LE::NAME));
+ static::assertInstanceOf(ANSEL::class, $factory->make(ANSEL::NAME));
+ static::assertInstanceOf(ASCII::class, $factory->make(ASCII::NAME));
+ static::assertInstanceOf(CP437::class, $factory->make(CP437::NAME));
+ static::assertInstanceOf(CP850::class, $factory->make(CP850::NAME));
+ static::assertInstanceOf(Windows1250::class, $factory->make(Windows1250::NAME));
+ static::assertInstanceOf(Windows1251::class, $factory->make(Windows1251::NAME));
+ static::assertInstanceOf(Windows1252::class, $factory->make(Windows1252::NAME));
+ static::assertInstanceOf(MacRoman::class, $factory->make(MacRoman::NAME));
$this->expectException(DomainException::class);
$factory->make('Not the name of a valid encoding');
@@ -127,12 +127,12 @@ class EncodingFactoryTest extends TestCase
$encodings = $factory->list();
- $this->assertCount(13, $encodings);
+ static::assertCount(13, $encodings);
foreach ($encodings as $key => $value) {
- $this->assertIsString($key);
- $this->assertIsString($value);
- $this->assertInstanceOf(EncodingInterface::class, $factory->make($key));
+ static::assertIsString($key);
+ static::assertIsString($value);
+ static::assertInstanceOf(EncodingInterface::class, $factory->make($key));
}
}
}
diff --git a/tests/app/Factories/MarkdownFactoryTest.php b/tests/app/Factories/MarkdownFactoryTest.php
index dfeeb01ab4..7d84c52110 100644
--- a/tests/app/Factories/MarkdownFactoryTest.php
+++ b/tests/app/Factories/MarkdownFactoryTest.php
@@ -36,7 +36,7 @@ class MarkdownFactoryTest extends TestCase
{
$factory = new MarkdownFactory();
- $this->assertSame(
+ static::assertSame(
"<p>FOO <a href=\"https://example.com\">https://example.com</a> BAR</p>\n",
$factory->autolink('FOO https://example.com BAR')
);
@@ -51,7 +51,7 @@ class MarkdownFactoryTest extends TestCase
$factory = new MarkdownFactory();
$tree = $this->createStub(Tree::class);
- $this->assertSame(
+ static::assertSame(
"<p>FOO <a href=\"https://example.com\">https://example.com</a> BAR</p>\n",
$factory->autolink('FOO https://example.com BAR', $tree)
);
@@ -65,7 +65,7 @@ class MarkdownFactoryTest extends TestCase
{
$factory = new MarkdownFactory();
- $this->assertSame(
+ static::assertSame(
"<p>&lt;b&gt; <a href=\"https://example.com\">https://example.com</a> &lt;/b&gt;</p>\n",
$factory->autolink('<b> https://example.com </b>')
);
@@ -78,12 +78,12 @@ class MarkdownFactoryTest extends TestCase
{
$factory = new MarkdownFactory();
- $this->assertSame(
+ static::assertSame(
"<p>FOO https://example.com BAR</p>\n",
$factory->markdown('FOO https://example.com BAR')
);
- $this->assertSame(
+ static::assertSame(
"<p>FOO <a href=\"https://example.com\">https://example.com</a> BAR</p>\n",
$factory->markdown('FOO <https://example.com> BAR')
);
@@ -98,12 +98,12 @@ class MarkdownFactoryTest extends TestCase
$tree = $this->createStub(Tree::class);
$factory = new MarkdownFactory();
- $this->assertSame(
+ static::assertSame(
"<p>FOO https://example.com BAR</p>\n",
$factory->markdown('FOO https://example.com BAR', $tree)
);
- $this->assertSame(
+ static::assertSame(
"<p>FOO <a href=\"https://example.com\">https://example.com</a> BAR</p>\n",
$factory->markdown('FOO <https://example.com> BAR', $tree)
);
@@ -117,7 +117,7 @@ class MarkdownFactoryTest extends TestCase
{
$factory = new MarkdownFactory();
- $this->assertSame(
+ static::assertSame(
"<p>&lt;b&gt; <a href=\"https://example.com\">https://example.com</a> &lt;/b&gt;</p>\n",
$factory->markdown('<b> <https://example.com> </b>')
);
diff --git a/tests/app/Module/MapLinkBingTest.php b/tests/app/Module/MapLinkBingTest.php
index 743235a75f..90e08d12ce 100644
--- a/tests/app/Module/MapLinkBingTest.php
+++ b/tests/app/Module/MapLinkBingTest.php
@@ -43,7 +43,7 @@ class MapLinkBingTest extends TestCase
$html = $module->mapLink($fact);
- $this->assertSame('', $html);
+ static::assertSame('', $html);
}
/**
diff --git a/tests/app/Module/MapLinkGoogleTest.php b/tests/app/Module/MapLinkGoogleTest.php
index 76cfc64c6b..697f0b7cf5 100644
--- a/tests/app/Module/MapLinkGoogleTest.php
+++ b/tests/app/Module/MapLinkGoogleTest.php
@@ -43,7 +43,7 @@ class MapLinkGoogleTest extends TestCase
$html = $module->mapLink($fact);
- $this->assertSame('', $html);
+ static::assertSame('', $html);
}
/**
diff --git a/tests/app/Module/MapLinkOpenStreetMapTest.php b/tests/app/Module/MapLinkOpenStreetMapTest.php
index 302a470be2..db0287ac86 100644
--- a/tests/app/Module/MapLinkOpenStreetMapTest.php
+++ b/tests/app/Module/MapLinkOpenStreetMapTest.php
@@ -43,7 +43,7 @@ class MapLinkOpenStreetMapTest extends TestCase
$html = $module->mapLink($fact);
- $this->assertSame('', $html);
+ static::assertSame('', $html);
}
/**
diff --git a/tests/app/Reports/RightToLeftSupportTest.php b/tests/app/Reports/RightToLeftSupportTest.php
index fee3b6fe28..4a06c477a4 100644
--- a/tests/app/Reports/RightToLeftSupportTest.php
+++ b/tests/app/Reports/RightToLeftSupportTest.php
@@ -37,13 +37,13 @@ class RightToLeftSupportTest extends TestCase
public function testEmptyString(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'',
RightToLeftSupport::spanLtrRtl('')
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'',
RightToLeftSupport::spanLtrRtl('')
);
@@ -57,77 +57,77 @@ class RightToLeftSupportTest extends TestCase
public function testStripControlCharacters(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl('foo&lrm;bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl('foo&rlm;bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\x8Ebar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\x8Fbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xADbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xAEbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xAAbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xABbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xACbar")
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl('foo&lrm;bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl('foo&rlm;bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\x8Ebar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\x8Fbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xADbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xAEbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xAAbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xABbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foobar</span>',
RightToLeftSupport::spanLtrRtl("foo\xE2\x80\xACbar")
);
@@ -141,21 +141,21 @@ class RightToLeftSupportTest extends TestCase
public function testNewLinesBecomeHTMLBreaks(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo</span><br><span dir="ltr">bar</span>',
RightToLeftSupport::spanLtrRtl("foo\nbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג</span><br><span dir="rtl">דהו</span>',
RightToLeftSupport::spanLtrRtl("אבג\nדהו")
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo</span><br><span dir="ltr">bar</span>',
RightToLeftSupport::spanLtrRtl("foo\nbar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג</span><br><span dir="rtl">דהו</span>',
RightToLeftSupport::spanLtrRtl("אבג\nדהו")
);
@@ -169,21 +169,21 @@ class RightToLeftSupportTest extends TestCase
public function testLineBreaks(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo</span><br><span dir="ltr">bar</span>',
RightToLeftSupport::spanLtrRtl("foo<br>bar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג</span><br><span dir="rtl">דהו</span>',
RightToLeftSupport::spanLtrRtl("אבג<br>דהו")
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo</span><br><span dir="ltr">bar</span>',
RightToLeftSupport::spanLtrRtl("foo<br>bar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג</span><br><span dir="rtl">דהו</span>',
RightToLeftSupport::spanLtrRtl("אבג<br>דהו")
);
@@ -197,29 +197,29 @@ class RightToLeftSupportTest extends TestCase
public function testHtmlEntities(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo&nbsp;bar</span>',
RightToLeftSupport::spanLtrRtl('foo&nbsp;bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג&nbsp;דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג&nbsp;דהו')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo&bar</span>',
RightToLeftSupport::spanLtrRtl('foo&bar')
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo&nbsp;bar</span>',
RightToLeftSupport::spanLtrRtl("foo&nbsp;bar")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג&nbsp;דהו</span>',
RightToLeftSupport::spanLtrRtl("אבג&nbsp;דהו")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo&bar</span>',
RightToLeftSupport::spanLtrRtl('foo&bar')
);
@@ -233,29 +233,29 @@ class RightToLeftSupportTest extends TestCase
public function testBraces(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo{{123}}bar</span>',
RightToLeftSupport::spanLtrRtl('foo{{123}}bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo{{bar</span>',
RightToLeftSupport::spanLtrRtl('foo{{bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג{{123}}דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג{{123}}דהו')
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo{{123}}bar</span>',
RightToLeftSupport::spanLtrRtl('foo{{123}}bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo{{bar</span>',
RightToLeftSupport::spanLtrRtl('foo{{bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג{{123}}דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג{{123}}דהו')
);
@@ -269,53 +269,53 @@ class RightToLeftSupportTest extends TestCase
public function testNumbers(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo 123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo 123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo +123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo +123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo -123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo -123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג 123,456.789 דהו')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪+123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג +123,456.789 דהו')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪-123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג -123,456.789 דהו')
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo 123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo 123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo +123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo +123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo -123,456.789 bar</span>',
RightToLeftSupport::spanLtrRtl('foo -123,456.789 bar')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג 123,456.789 דהו')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪+123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג +123,456.789 דהו')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג ‪-123,456.789‬ דהו</span>',
RightToLeftSupport::spanLtrRtl('אבג -123,456.789 דהו')
);
@@ -329,37 +329,37 @@ class RightToLeftSupportTest extends TestCase
public function testParentheses(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo (bar)</span>',
RightToLeftSupport::spanLtrRtl('foo (bar)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo </span><span dir="rtl">(אבג)</span>',
RightToLeftSupport::spanLtrRtl('foo (אבג)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג</span><span dir="ltr"> (bar)</span>',
RightToLeftSupport::spanLtrRtl('אבג (bar)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג (דהו)</span>',
RightToLeftSupport::spanLtrRtl('אבג (דהו)')
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo (bar)</span>',
RightToLeftSupport::spanLtrRtl('foo (bar)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">foo </span><span dir="rtl">(אבג)</span>',
RightToLeftSupport::spanLtrRtl('foo (אבג)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג </span><span dir="ltr">(bar)</span>',
RightToLeftSupport::spanLtrRtl('אבג (bar)')
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">אבג (דהו)</span>',
RightToLeftSupport::spanLtrRtl('אבג (דהו)')
);
@@ -373,21 +373,21 @@ class RightToLeftSupportTest extends TestCase
public function testUnescapedHtml(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">>foo<</span>',
RightToLeftSupport::spanLtrRtl(">foo<")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">></span><span dir="rtl">אבג<</span>',
RightToLeftSupport::spanLtrRtl(">אבג<")
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">></span><span dir="ltr">foo<</span>',
RightToLeftSupport::spanLtrRtl(">foo<")
);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">>אבג<</span>',
RightToLeftSupport::spanLtrRtl(">אבג<")
);
@@ -401,13 +401,13 @@ class RightToLeftSupportTest extends TestCase
public function testBreakInNumber(): void
{
I18N::init('en-US', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="ltr">123</span><br><span dir="ltr">456</span>',
RightToLeftSupport::spanLtrRtl("123<br>456")
);
I18N::init('he', true);
- $this->assertSame(
+ static::assertSame(
'<span dir="rtl">‪123‬</span><br><span dir="rtl">‪456‬</span>',
RightToLeftSupport::spanLtrRtl("123<br>456")
);
diff --git a/tests/app/Services/GedcomEditServiceTest.php b/tests/app/Services/GedcomEditServiceTest.php
index e87a9f2e42..6b8027ff18 100644
--- a/tests/app/Services/GedcomEditServiceTest.php
+++ b/tests/app/Services/GedcomEditServiceTest.php
@@ -35,7 +35,7 @@ class GedcomEditServiceTest extends TestCase
{
$gedcom_edit_service = new GedcomEditService();
- $this->assertSame(
+ static::assertSame(
"1 BIRT Y",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -45,7 +45,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"1 BIRT Y\n2 ADDR England",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -55,7 +55,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"1 BIRT\n2 PLAC England",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -65,7 +65,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"1 BIRT\n2 PLAC England\n2 SOUR @S1@\n3 PAGE 123",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -76,7 +76,7 @@ class GedcomEditServiceTest extends TestCase
);
// Missing SOUR, so ignore PAGE
- $this->assertSame(
+ static::assertSame(
"1 BIRT\n2 PLAC England",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -86,7 +86,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"1 BIRT\n2 PLAC England",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -96,7 +96,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"1 BIRT\n2 PLAC England\n1 DEAT\n2 PLAC Scotland",
$gedcom_edit_service->editLinesToGedcom(
'INDI',
@@ -106,7 +106,7 @@ class GedcomEditServiceTest extends TestCase
)
);
- $this->assertSame(
+ static::assertSame(
"0 NOTE @N1@\n1 CONC foo\n1 CONT bar\n1 RESN locked",
$gedcom_edit_service->editLinesToGedcom(
'NOTE',
diff --git a/tests/app/Services/RateLimitServiceTest.php b/tests/app/Services/RateLimitServiceTest.php
index d2af39e204..9b7eec89eb 100644
--- a/tests/app/Services/RateLimitServiceTest.php
+++ b/tests/app/Services/RateLimitServiceTest.php
@@ -63,15 +63,15 @@ class RateLimitServiceTest extends TestCase
$rate_limit_service->limitRateForUser($user, 3, 30, 'rate-limit');
$history = $user->getPreference('rate-limit');
- $this->assertCount(1, explode(',', $history));
+ static::assertCount(1, explode(',', $history));
$rate_limit_service->limitRateForUser($user, 3, 30, 'rate-limit');
$history = $user->getPreference('rate-limit');
- $this->assertCount(2, explode(',', $history));
+ static::assertCount(2, explode(',', $history));
$rate_limit_service->limitRateForUser($user, 3, 30, 'rate-limit');
$history = $user->getPreference('rate-limit');
- $this->assertCount(3, explode(',', $history));
+ static::assertCount(3, explode(',', $history));
}
/**
@@ -90,7 +90,7 @@ class RateLimitServiceTest extends TestCase
$rate_limit_service->limitRateForUser($user, 5, 30, 'rate-limit');
$history = $user->getPreference('rate-limit');
- $this->assertCount(6, explode(',', $history));
+ static::assertCount(6, explode(',', $history));
}
/**