From 016287d5b06f854227a12d120b5dee21b8c63121 Mon Sep 17 00:00:00 2001 From: GoZ Date: Mon, 16 Mar 2015 16:34:35 +0100 Subject: [PATCH] #2030633 change some public properties to protected --- src/Tests/ProfileAccessTest.php | 10 +++++----- src/Tests/ProfileAttachTest.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Tests/ProfileAccessTest.php b/src/Tests/ProfileAccessTest.php index 14272ee..0be9410 100644 --- a/src/Tests/ProfileAccessTest.php +++ b/src/Tests/ProfileAccessTest.php @@ -41,8 +41,8 @@ function setUp() { $this->field->save(); $this->instance = array( - 'entity_type' => $this->field->entity_type, - 'field_name' => $this->field->field_name, + 'entity_type' => $this->field->getTargetEntityTypeId(), + 'field_name' => $this->field->getName(), 'bundle' => $this->type->id(), 'label' => 'Full name', 'widget' => array( @@ -53,13 +53,13 @@ function setUp() { $this->instance->save(); $this->display = entity_get_display('profile', 'test', 'default') - ->setComponent($this->field->field_name, array( + ->setComponent($this->field->getName(), array( 'type' => 'text_default', )); $this->display->save(); $this->form = entity_get_form_display('profile', 'test', 'default') - ->setComponent($this->field->field_name, array( + ->setComponent($this->field->getName(), array( 'type' => 'string_textfield', )); $this->form->save(); @@ -81,7 +81,7 @@ function setUp() { */ function testAdminOnlyProfiles() { $id = $this->type->id(); - $field_name = $this->field->field_name; + $field_name = $this->field->getName(); // Create a test user account. $web_user = $this->drupalCreateUser(array('access user profiles')); diff --git a/src/Tests/ProfileAttachTest.php b/src/Tests/ProfileAttachTest.php index c1a9f9d..80c697f 100644 --- a/src/Tests/ProfileAttachTest.php +++ b/src/Tests/ProfileAttachTest.php @@ -42,8 +42,8 @@ function setUp() { $this->field->save(); $this->instance = array( - 'entity_type' => $this->field->entity_type, - 'field_name' => $this->field->field_name, + 'entity_type' => $this->field->getTargetEntityTypeId(), + 'field_name' => $this->field->getName(), 'bundle' => $this->type->id(), 'label' => 'Full name', 'required' => TRUE, @@ -55,13 +55,13 @@ function setUp() { $this->instance->save(); $this->display = entity_get_display('profile', 'test', 'default') - ->setComponent($this->field->field_name, array( + ->setComponent($this->field->getName(), array( 'type' => 'text_default', )); $this->display->save(); $this->form = entity_get_form_display('profile', 'test', 'default') - ->setComponent($this->field->field_name, array( + ->setComponent($this->field->getName(), array( 'type' => 'string_textfield', )); $this->form->save(); @@ -74,7 +74,7 @@ function setUp() { */ function testUserRegisterForm() { $id = $this->type->id(); - $field_name = $this->field->field_name; + $field_name = $this->field->getName(); // Allow registration without administrative approval and log in user // directly after registering.