Skip to content

Commit

Permalink
Merge pull request #6 from herbdool/1.x-1.x
Browse files Browse the repository at this point in the history
Get tests running and entity_access fix
  • Loading branch information
herbdool authored Apr 4, 2017
2 parents 36c7f9a + ef94ba2 commit 196827a
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 380 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ protected function reAlterQuery(SelectQueryInterface $query, $tag, $base_table)
*/
public function getLabel($entity) {
$target_type = $this->field['settings']['target_type'];
return entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t('- Restricted access -');
return entityreference_entity_access('view', $target_type, $entity) ? entity_label($target_type, $entity) : t('- Restricted access -');
}

/**
Expand Down
9 changes: 1 addition & 8 deletions tests/entityreference.admin.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,9 @@
* Test for Entity Reference admin UI.
*/
class EntityReferenceAdminTestCase extends BackdropWebTestCase {
public static function getInfo() {
return array(
'name' => 'Entity Reference UI',
'description' => 'Tests for the administrative UI.',
'group' => 'Entity Reference',
);
}

public function setUp() {
parent::setUp(array('field_ui', 'entity', 'ctools', 'entityreference'));
parent::setUp(array('field_ui', 'entity', 'entityreference'));

// Create test user.
$this->admin_user = $this->backdropCreateUser(array('access content', 'administer content types', 'administer fields'));
Expand Down
241 changes: 0 additions & 241 deletions tests/entityreference.feeds.test

This file was deleted.

7 changes: 0 additions & 7 deletions tests/entityreference.handlers.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
* Test for Entity Reference handlers.
*/
class EntityReferenceHandlersTestCase extends BackdropWebTestCase {
public static function getInfo() {
return array(
'name' => 'Entity Reference Handlers',
'description' => 'Tests for the base handlers provided by Entity Reference.',
'group' => 'Entity Reference',
);
}

public function setUp() {
parent::setUp('entityreference');
Expand Down
7 changes: 0 additions & 7 deletions tests/entityreference.taxonomy.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
* Test for Entity Reference taxonomy integration.
*/
class EntityReferenceTaxonomyTestCase extends BackdropWebTestCase {
public static function getInfo() {
return array(
'name' => 'Entity Reference Taxonomy',
'description' => 'Tests nodes with reference to terms as indexed.',
'group' => 'Entity Reference',
);
}

public function setUp() {
parent::setUp('entityreference', 'taxonomy');
Expand Down
17 changes: 17 additions & 0 deletions tests/entityreference.tests.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[EntityReferenceAdminTestCase]
name = Entity Reference UI
description = Tests for the administrative UI.
group = Entity Reference
file = entityreference.admin.test

[EntityReferenceHandlersTestCase]
name = Entity Reference Handlers
description = Tests for the base handlers provided by Entity Reference.
group = Entity Reference
file = entityreference.handlers.test

[EntityReferenceTaxonomyTestCase]
name = Entity Reference Taxonomy
description = Tests nodes with reference to terms as indexed.
group = Entity Reference
file = entityreference.taxonomy.test
3 changes: 0 additions & 3 deletions tests/feeds_test.csv

This file was deleted.

This file was deleted.

Loading

0 comments on commit 196827a

Please sign in to comment.