Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dunix created an issue. See original summary.

morenstrat’s picture

Status: Needs review » Needs work

The last submitted patch, 2: inject_string_translation_service-2563099-2.patch, failed testing.

morenstrat’s picture

Updated the failing tests. These are my first attempts at d8 tests, so I'm not sure if I'm doing things right. Any form of guidance is welcome.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

Version: 8.1.x-dev » 8.2.x-dev
Status: Needs review » Needs work

Moving to 8.2.x since this is a code change.

Patch applies, oddly enough. :-)

Re-running the testbot to see if it still works.

Just one thing to review at the moment:

+++ b/core/modules/forum/src/Breadcrumb/ForumBreadcrumbBuilderBase.php
@@ -55,11 +56,14 @@
+    $this->stringTranslation = $string_translation;

StringTranslationTrait has setStringTranslation(), which we should use.

Mile23’s picture

morenstrat’s picture

morenstrat’s picture

Status: Needs work » Needs review
Mile23’s picture

Status: Needs review » Reviewed & tested by the community

Cool, thanks.

Addressed #6, patch applies, tests are green.

There's still this kind of thing:

+++ b/core/modules/forum/tests/src/Unit/Breadcrumb/ForumBreadcrumbBuilderBaseTest.php
@@ -42,6 +42,7 @@ public function testConstructor() {
+    $translation_manager = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');

It'd be nice to use TranslationInterface::class instead of the literal string, but then it would be different from all the other mocks in the test. So favoring consistency let's RTBC. Maintainers can of course disagree and send it back.

Wim Leers’s picture

Priority: Normal » Minor

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 8: inject_string_translation_service-2563099-8.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Reviewed & tested by the community
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in test_field_field_complex_test[test_field_field_complex_test]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'jenkins_default_155622.simpletest113246entity_test' doesn't exist: SELECT entity_test.id AS entity_test_id, entity_test.id AS id, users_field_data_entity_test.uid AS users_field_data_entity_test_uid
FROM 
{entity_test} entity_test
LEFT JOIN {users_field_data} users_field_data_entity_test ON entity_test.user_id = users_field_data_entity_test.uid
ORDER BY entity_test_id ASC
LIMIT 11 OFFSET 0; Array
(
)

Looks like something was wrong with this DrupalCI instance. Re-testing.

  • catch committed 0745511 on 8.2.x
    Issue #2563099 by morenstrat: Inject string translation service into...
catch’s picture

Status: Reviewed & tested by the community » Fixed

I think it's OK to do the test changes later.

Committed 0745511 and pushed to 8.2.x. Thanks!

Status: Fixed » Closed (fixed)

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