Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnold French committed Aug 31, 2024
1 parent 24aa3ed commit 937c971
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CiviCRM Entity Fullcalendar Test
type: module
description: 'Test module for CiviCRM Entity and Fullcalendar View.'
package: CiviCRM
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
dependencies:
- drupal:datetime
- drupal:taxonomy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CiviCRM Entity Test
type: module
description: 'Test module for CiviCRM.'
package: CiviCRM
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
dependencies:
- civicrm
- civicrm_entity
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CiviCRM Entity Views Test
type: module
description: 'Test module for CiviCRM Entity and Views.'
package: CiviCRM
core_version_requirement: ^10
core_version_requirement: ^10 || ^11
dependencies:
- drupal:views
- civicrm:civicrm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class CivicrmContactUserRelationshipTest extends CivicrmEntityTestBase {
* {@inheritdoc}
*/
public function setUp(): void {
if ($this->getName() === 'testWithSeperateDatabase' && empty(getenv('SIMPLETEST_CIVICRM_DB'))) {
if ($this->toString() === 'testWithSeperateDatabase' && empty(getenv('SIMPLETEST_CIVICRM_DB'))) {
$this->markTestSkipped("Cannot run {$this->getName()} without specifying SIMPLETEST_CIVICRM_DB as a seperate database.");
}
parent::setUp();
Expand Down Expand Up @@ -93,7 +93,7 @@ public function setUp(): void {
protected function changeDatabasePrefix() {
parent::changeDatabasePrefix();
// Change the CiviCRM connection to use the separate database.
if ($this->getName() === 'testWithSeperateDatabase') {
if ($this->toString() === 'testWithSeperateDatabase') {
$db_url = getenv('SIMPLETEST_CIVICRM_DB');
Database::removeConnection('civicrm_test');
Database::removeConnection('civicrm');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected function assertViewWithSortsResults() {
/**
* {@inheritdoc}
*/
protected function doSetupViewWithArguments() {
public static function doSetupViewWithArguments() {
$this->addArgumentToDisplay('name[civicrm_event.id]');
$this->addFieldToDisplay('name[civicrm_event.description__value]');
$this->addFieldToDisplay('name[civicrm_event.summary]');
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/CivicrmStorageGetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testLoadContact() {
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
public function testDatetimeTimezone(array $original_datetimes, array $expected_utc_datetime, $timezone) {
public static function testDatetimeTimezone(array $original_datetimes, array $expected_utc_datetime, $timezone) {
date_default_timezone_set($timezone);
$civicrm_api_mock = $this->prophesize(CiviCrmApiInterface::class);
$civicrm_api_mock->get('event', [
Expand Down

0 comments on commit 937c971

Please sign in to comment.