diff --git a/trpcultivate_germcollection/tests/src/Functional/InstallTest.php b/trpcultivate_germcollection/tests/src/Functional/InstallTest.php index c888c55..c9c94a4 100644 --- a/trpcultivate_germcollection/tests/src/Functional/InstallTest.php +++ b/trpcultivate_germcollection/tests/src/Functional/InstallTest.php @@ -69,10 +69,14 @@ public function testLoad() { public function testHelp() { $session = $this->getSession(); - $some_extected_text = self::$help_text_excerpt; + $some_expected_text = self::$help_text_excerpt; // Ensure we have an admin user. - $user = $this->drupalCreateUser(['access administration pages', 'administer modules']); + $permissions = ['access administration pages', 'administer modules']; + if (strncmp(\Drupal::VERSION, '10.2', 4) === 0) { + $permissions[] = 'access help pages'; + } + $user = $this->drupalCreateUser($permissions); $this->drupalLogin($user); $context = '(modules installed: ' . implode(',', self::$modules) . ')'; @@ -83,7 +87,7 @@ public function testHelp() { $hook_name = self::$module_machinename . '_help'; $output = $hook_name($name, $match); $this->assertNotEmpty($output, "The help hook should return output $context."); - $this->assertStringContainsString($some_extected_text, $output); + $this->assertStringContainsString($some_expected_text, $output); // Help Page. $this->drupalGet('admin/help'); @@ -93,7 +97,7 @@ public function testHelp() { $this->drupalGet('admin/help/' . self::$module_machinename); $status_code = $session->getStatusCode(); $this->assertEquals(200, $status_code, "The module help page should be able to load $context."); - $this->assertSession()->pageTextContains($some_extected_text); + $this->assertSession()->pageTextContains($some_expected_text); } } diff --git a/trpcultivate_germplasm/tests/src/Functional/InstallTest.php b/trpcultivate_germplasm/tests/src/Functional/InstallTest.php index a445bc0..ef6bbad 100644 --- a/trpcultivate_germplasm/tests/src/Functional/InstallTest.php +++ b/trpcultivate_germplasm/tests/src/Functional/InstallTest.php @@ -14,6 +14,13 @@ class InstallTest extends ChadoTestBrowserBase { protected $defaultTheme = 'stark'; + + /** + * The service for retreiving a connection with Chado. + * + * @var Drupal\tripal_chado\Database\ChadoConnection + */ + protected $connection; /** * Modules to enable. @@ -88,10 +95,14 @@ public function testLoad() { public function testHelp() { $session = $this->getSession(); - $some_extected_text = self::$help_text_excerpt; + $some_expected_text = self::$help_text_excerpt; // Ensure we have an admin user. - $user = $this->drupalCreateUser(['access administration pages', 'administer modules']); + $permissions = ['access administration pages', 'administer modules']; + if (strncmp(\Drupal::VERSION, '10.2', 4) === 0) { + $permissions[] = 'access help pages'; + } + $user = $this->drupalCreateUser($permissions); $this->drupalLogin($user); $context = '(modules installed: ' . implode(',', self::$modules) . ')'; @@ -102,7 +113,7 @@ public function testHelp() { $hook_name = self::$module_machinename . '_help'; $output = $hook_name($name, $match); $this->assertNotEmpty($output, "The help hook should return output $context."); - $this->assertStringContainsString($some_extected_text, $output); + $this->assertStringContainsString($some_expected_text, $output); // Help Page. $this->drupalGet('admin/help'); @@ -112,7 +123,7 @@ public function testHelp() { $this->drupalGet('admin/help/' . self::$module_machinename); $status_code = $session->getStatusCode(); $this->assertEquals(200, $status_code, "The module help page should be able to load $context."); - $this->assertSession()->pageTextContains($some_extected_text); + $this->assertSession()->pageTextContains($some_expected_text); } } diff --git a/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterRunTest.php b/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterRunTest.php index 2fb690a..67bc474 100644 --- a/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterRunTest.php +++ b/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterRunTest.php @@ -21,6 +21,10 @@ class GermplasmAccessionImporterRunTest extends ChadoTestKernelBase { protected $importer; + protected $config_factory; + + protected $connection; + protected $logger; protected $definitions = [ diff --git a/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterTest.php b/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterTest.php index dac947f..905bfd0 100644 --- a/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterTest.php +++ b/trpcultivate_germplasm/tests/src/Kernel/TripalImporter/GermplasmAccessionImporter/GermplasmAccessionImporterTest.php @@ -19,6 +19,10 @@ class GermplasmAccessionImporterTest extends ChadoTestKernelBase { protected $importer; + protected $config_factory; + + protected $connection; + protected $definitions = [ 'test-germplasm-accession' => [ 'id' => 'trpcultivate-germplasm-accession',