Updated: Comment 0

Problem/Motivation

While working with the ControllerBase I realized that config return an unexpected value.

Proposed resolution

Remaining tasks

User interface changes

API changes

Files: 
CommentFileSizeAuthor
#5 controller-2089195-FAIL.patch2.11 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 59,216 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#5 controller-2089195-PASS.patch2.76 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 59,217 pass(es).
[ View ]
#1 controllerbase-2089195-1.patch662 bytesdawehner
PASSED: [[SimpleTest]]: [MySQL] 59,227 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new662 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,227 pass(es).
[ View ]

.

Status:Needs review» Reviewed & tested by the community

yes, simple fix.

Status:Reviewed & tested by the community» Needs work
Issue tags:+Quick fix, +Needs tests

Hm. Tests? :\

I was indeed confused that alex refused some tests for https://drupal.org/node/2078285#comment-7859707

Status:Needs work» Needs review
StatusFileSize
new2.76 KB
PASSED: [[SimpleTest]]: [MySQL] 59,217 pass(es).
[ View ]
new2.11 KB
FAILED: [[SimpleTest]]: [MySQL] 59,216 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

So here is a unit test, take it or drop it :)

#5: controller-2089195-FAIL.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community
Issue tags:-Needs tests

Yes, agreed that it makes sense. There are use cases where you need the config factory, but $this->config() should work the same way as Drupal::config().

Unit tests look fine to me, we can extend them for other methods if there's a problem later on.

+1 to rtbc, this really need for complex controllers

Status:Reviewed & tested by the community» Fixed

Committed a40399f and pushed to 8.x. Thanks!

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