Skip to content

Commit

Permalink
use entitymanager for backport compability
Browse files Browse the repository at this point in the history
  • Loading branch information
DiDebru committed Nov 19, 2018
1 parent 8032e78 commit a430a74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions og_ui/tests/src/Functional/BundleFormAlterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ class BundleFormAlterTest extends BrowserTestBase {
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
* @var \Drupal\Core\Entity\EntityManagerInterface
*/
protected $entityTypeManager;
protected $entityManager;

/**
* {@inheritdoc}
*/
public function setUp() {
parent::setUp();

$this->entityTypeManager = \Drupal::entityTypeManager();
$this->entityManager = \Drupal::entityManager();

// Log in as an administrator that can manage blocks and content types.
$this->adminUser = $this->drupalCreateUser([
Expand Down Expand Up @@ -121,7 +121,7 @@ public function testGroupContentAjax() {
$form_state = new FormState();
// Set the form state as if the 'entity_test' option was chosen with AJAX.
$form_state->setValue('og_target_type', 'entity_test');
$entity = $this->entityTypeManager->getStorage('node_type')->create([]);
$entity = $this->entityManager->getStorage('node_type')->create([]);
(new BundleFormAlter($entity))->formAlter($form, $form_state);

// Check that the target bundles are set to the test entity bundle.
Expand Down

0 comments on commit a430a74

Please sign in to comment.