Skip to content

Instantly share code, notes, and snippets.

@imcbride
Created July 16, 2021 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imcbride/e6263f6a4fcc3550d063a5821cc58a1a to your computer and use it in GitHub Desktop.
Save imcbride/e6263f6a4fcc3550d063a5821cc58a1a to your computer and use it in GitHub Desktop.
diff --git a/migrate_api.info.yml b/migrate_api.info.yml
index 53e7a5c..623e7ac 100644
--- a/migrate_api.info.yml
+++ b/migrate_api.info.yml
@@ -1,11 +1,10 @@
name: Migrate API
description: Migrate API provodes additional functionality on-top of cores Migrate.
type: module
-# core: 8.x
+core_version_requirement: ^8 || ^9
package: Migrate
# Information added by Drupal.org packaging script on 2016-02-02
version: '8.x-1.1'
-core: '8.x'
project: 'migrate_api'
datestamp: 1454403243
diff --git a/tests/src/Unit/SchemaFormBuilderTest.php b/tests/src/Unit/SchemaFormBuilderTest.php
index edfbf7b..8b9ab47 100644
--- a/tests/src/Unit/SchemaFormBuilderTest.php
+++ b/tests/src/Unit/SchemaFormBuilderTest.php
@@ -215,7 +215,7 @@ class SchemaFormBuilderTest extends UnitTestCase {
*/
public function testSchemaFormBuilder($schema_definition, $form_element) {
$schema_manager = $this->getMockSchemaFormBuilder($schema_definition);
- $form_array = $schema_manager->getFormArray('id', $this->getMock('Drupal\Core\Form\FormStateInterface'));
+ $form_array = $schema_manager->getFormArray('id', $this->createMock('Drupal\Core\Form\FormStateInterface'));
// Squash and alter certain types of data from the form definition because
// they are supurflous to the testing and make writing the data provider
// more difficult.
@@ -231,9 +231,9 @@ class SchemaFormBuilderTest extends UnitTestCase {
* Get a mock schema manager which will always serve a specified definition.
*/
protected function getMockSchemaFormBuilder($definition) {
- $data = $this->getMock('Drupal\Core\TypedData\TraversableTypedDataInterface');
+ $data = $this->createMock('Drupal\Core\TypedData\TraversableTypedDataInterface');
$data->method('getDataDefinition')->willReturn($definition);
- $manager = $this->getMock('Drupal\Core\Config\TypedConfigManagerInterface');
+ $manager = $this->createMock('Drupal\Core\Config\TypedConfigManagerInterface');
$manager->method('get')->willReturn($data);
$form_builder = $this->getMockBuilder('Drupal\migrate_api\SchemaFormBuilder');
$form_builder->setConstructorArgs([$manager]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment