summaryrefslogtreecommitdiff
path: root/tests/app/Elements
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2025-01-05 22:59:29 +0000
committerGreg Roach <greg@subaqua.co.uk>2025-01-06 12:47:39 +0000
commit24cb7547cb882ddc3e5b99cdff164831ef80290c (patch)
tree98e5b0ad6c11771ae5ed86c89965027fd1ddc4ef /tests/app/Elements
parentab70d7f0caddd7fcd86d1f539eafdf19f1e65698 (diff)
downloadwebtrees-24cb7547cb882ddc3e5b99cdff164831ef80290c.tar.gz
webtrees-24cb7547cb882ddc3e5b99cdff164831ef80290c.tar.bz2
webtrees-24cb7547cb882ddc3e5b99cdff164831ef80290c.zip
Working on phpstan issues in test scripts
Diffstat (limited to 'tests/app/Elements')
-rw-r--r--tests/app/Elements/XrefFamilyTest.php6
-rw-r--r--tests/app/Elements/XrefIndividualTest.php6
-rw-r--r--tests/app/Elements/XrefLocationTest.php6
-rw-r--r--tests/app/Elements/XrefMediaTest.php6
-rw-r--r--tests/app/Elements/XrefNoteTest.php6
-rw-r--r--tests/app/Elements/XrefRepositoryTest.php6
-rw-r--r--tests/app/Elements/XrefSharedNoteTest.php6
-rw-r--r--tests/app/Elements/XrefSourceTest.php6
-rw-r--r--tests/app/Elements/XrefSubmissionTest.php6
-rw-r--r--tests/app/Elements/XrefSubmitterTest.php6
10 files changed, 40 insertions, 20 deletions
diff --git a/tests/app/Elements/XrefFamilyTest.php b/tests/app/Elements/XrefFamilyTest.php
index 80486adf18..dd2866def2 100644
--- a/tests/app/Elements/XrefFamilyTest.php
+++ b/tests/app/Elements/XrefFamilyTest.php
@@ -58,8 +58,10 @@ class XrefFamilyTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
diff --git a/tests/app/Elements/XrefIndividualTest.php b/tests/app/Elements/XrefIndividualTest.php
index 96e2f26eba..8fb1bde548 100644
--- a/tests/app/Elements/XrefIndividualTest.php
+++ b/tests/app/Elements/XrefIndividualTest.php
@@ -58,8 +58,10 @@ class XrefIndividualTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
diff --git a/tests/app/Elements/XrefLocationTest.php b/tests/app/Elements/XrefLocationTest.php
index 2d351a774b..4d520dd22c 100644
--- a/tests/app/Elements/XrefLocationTest.php
+++ b/tests/app/Elements/XrefLocationTest.php
@@ -58,8 +58,10 @@ class XrefLocationTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
diff --git a/tests/app/Elements/XrefMediaTest.php b/tests/app/Elements/XrefMediaTest.php
index 0c424d34db..2b821a1420 100644
--- a/tests/app/Elements/XrefMediaTest.php
+++ b/tests/app/Elements/XrefMediaTest.php
@@ -58,8 +58,10 @@ class XrefMediaTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{
diff --git a/tests/app/Elements/XrefNoteTest.php b/tests/app/Elements/XrefNoteTest.php
index 15d0aadb95..d0b976e68b 100644
--- a/tests/app/Elements/XrefNoteTest.php
+++ b/tests/app/Elements/XrefNoteTest.php
@@ -53,8 +53,10 @@ class XrefNoteTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{
diff --git a/tests/app/Elements/XrefRepositoryTest.php b/tests/app/Elements/XrefRepositoryTest.php
index 36469aaea3..48af4607be 100644
--- a/tests/app/Elements/XrefRepositoryTest.php
+++ b/tests/app/Elements/XrefRepositoryTest.php
@@ -58,8 +58,10 @@ class XrefRepositoryTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{
diff --git a/tests/app/Elements/XrefSharedNoteTest.php b/tests/app/Elements/XrefSharedNoteTest.php
index ab83ed16e0..1aaec4ccc5 100644
--- a/tests/app/Elements/XrefSharedNoteTest.php
+++ b/tests/app/Elements/XrefSharedNoteTest.php
@@ -53,8 +53,10 @@ class XrefSharedNoteTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{
diff --git a/tests/app/Elements/XrefSourceTest.php b/tests/app/Elements/XrefSourceTest.php
index 794a9b4c7a..8bad1a7a04 100644
--- a/tests/app/Elements/XrefSourceTest.php
+++ b/tests/app/Elements/XrefSourceTest.php
@@ -60,8 +60,10 @@ class XrefSourceTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEditInlineSource(): void
diff --git a/tests/app/Elements/XrefSubmissionTest.php b/tests/app/Elements/XrefSubmissionTest.php
index d81b3199dd..7419c5dfb6 100644
--- a/tests/app/Elements/XrefSubmissionTest.php
+++ b/tests/app/Elements/XrefSubmissionTest.php
@@ -58,8 +58,10 @@ class XrefSubmissionTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{
diff --git a/tests/app/Elements/XrefSubmitterTest.php b/tests/app/Elements/XrefSubmitterTest.php
index 097740652b..b165d19d28 100644
--- a/tests/app/Elements/XrefSubmitterTest.php
+++ b/tests/app/Elements/XrefSubmitterTest.php
@@ -58,8 +58,10 @@ class XrefSubmitterTest extends TestCase
$select_nodes = $dom->getElementsByTagName('select');
self::assertEquals(1, $select_nodes->count());
- $option_nodes = $select_nodes[0]->getElementsByTagName('option');
- self::assertEquals(1, $option_nodes->count());
+ foreach ($select_nodes as $select_node) {
+ $option_nodes = $select_node->getElementsByTagName('option');
+ self::assertEquals(1, $option_nodes->count());
+ }
}
public function testEscape(): void
{