Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Tests/ProfileAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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();
Expand All @@ -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'));
Expand Down
10 changes: 5 additions & 5 deletions src/Tests/ProfileAttachTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand All @@ -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.
Expand Down