Skip to content

Commit

Permalink
Refactoring PHPUnit tests to support phpunit 9.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Madison committed May 3, 2022
1 parent 47fb4d8 commit e4ea4d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ composer.lock
reports
vendor
drush

.phpunit.result.cache
4 changes: 3 additions & 1 deletion tests/Drupal/Tests/Driver/Drupal7FieldHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Drupal\Tests\Driver;

use DMS\PHPUnitExtensions\ArraySubset\Assert;

/**
* Tests the Drupal 7 field handlers.
*/
Expand Down Expand Up @@ -32,7 +34,7 @@ public function testFieldHandlers($class_name, $entity, $entity_type, array $fie

$field_name = $field['field_name'];
$expanded_values = $handler->expand($this->values($entity->$field_name));
$this->assertArraySubset($expected_values, $expanded_values);
Assert::assertArraySubset($expected_values, $expanded_values);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Drupal/Tests/Driver/FieldHandlerAbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class FieldHandlerAbstractTest extends TestCase {
/**
* {@inheritdoc}
*/
public function tearDown() {
public function tearDown(): void {
\Mockery::close();
}

Expand Down

0 comments on commit e4ea4d7

Please sign in to comment.