The field_test module can be found in core/modules/field/test.
Where should we place the class?

field/lib/Drupal/field_test/ClassName

Or somewhere else?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Status: Active » Needs review
FileSize
3.2 KB

Can this work?

aspilicious’s picture

Ok this works, is this ok? Or should we place it inside:

field/tests/field_tests/lib/Drupal/field_test/ClassName

RobLoach’s picture

Status: Needs review » Needs work
+++ b/core/modules/field/lib/Drupal/field_test/TestEntityBundleController.phpundefined
@@ -0,0 +1,28 @@

@@ -0,0 +1,28 @@
+<?php

Since the class is part of the field_test module space, should it than live at:
core/modules/field/tests/lib/field_test/Drupal/field_test/TestEntityBundleController ?

aspilicious’s picture

Status: Needs work » Needs review
FileSize
5.83 KB

Lets try this one

Status: Needs review » Needs work

The last submitted patch, 1594466-test-entity-controller-4.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review

Apparantly the field_test module wasn't encapsulated yet in its own module. So I moved the files found in field/tests to field/tests/modules/field_test

This also makes this directory future proof and made it easier for me to create the field_test namespace

RobLoach’s picture

FileSize
4.12 KB

Believe it's missing an update to 'controller class' => 'TestEntityBundleController'? Also, probably still need that files definition.

RobLoach’s picture

FileSize
4.1 KB

Wrong namespace.

Status: Needs review » Needs work

The last submitted patch, 1594466.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review
FileSize
6.12 KB

Should work...

Status: Needs review » Needs work

The last submitted patch, 1594466-entity-controller-10.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review
FileSize
6.3 KB

This?

RobLoach’s picture

Status: Needs review » Reviewed & tested by the community

Excellent!

catch’s picture

Status: Reviewed & tested by the community » Needs review

Sorry I'm confused - don't we need to convert this to an Entity subclass instead? The old controller classes are going to disappear very soon. I don't mind committing this one just to finish off the PSR-0 conversion but wanted to check.

RobLoach’s picture

Switching to an Entity sub-class is probably the right direction for TestEntityBundleController, but also kind of out of scope for this issue. Once the files are cleaned up with PSR-0 we could easily re-evaluate how this entity controller test is accomplished. We could also remove it quite easily later on, when the controller classes disappear too.

This issue is simply to PSR-0 it. I'm going to stick this back to RTBC if the test-bot still likes it.

RobLoach’s picture

#12: 1594466-entity-controller-12.patch queued for re-testing.

RobLoach’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Issue tags: -PSR-0

#12: 1594466-entity-controller-12.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +PSR-0

The last submitted patch, 1594466-entity-controller-12.patch, failed testing.

RobLoach’s picture

Status: Needs work » Fixed

It looks like this was committed yesterday :-) .

l008’s picture

I feel a little bit confused. [img]http://www.uukk.info/uukk.gif[/img]

fago’s picture

I've opend #1616930: Fix the field_test entity type for fixing the entity type.

Automatically closed -- issue fixed for 2 weeks with no activity.