Improve docblocks in MigrateSqlSourceTestCase, as far as for now is the only "documentation" for testing migration source plugins.

Comments

Status: Needs review » Needs work

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

penyaskito’s picture

Status: Needs work » Needs review

MigrateSqlSourceTestCaseDocs.patch queued for re-testing.

Status: Needs review » Needs work

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

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

penyaskito’s picture

Status: Needs work » Needs review

MigrateSqlSourceTestCaseDocs.patch queued for re-testing.

Status: Needs review » Needs work

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

penyaskito’s picture

Status: Needs work » Needs review

MigrateSqlSourceTestCaseDocs.patch queued for re-testing.

jhodgdon’s picture

Status: Needs review » Needs work

Looks pretty good, thanks!

Can you fix the paragraph wrapping?

+   * Database contents represents a mocked database. It should contain an
+   * associative array with the table name as key, and as many nested arrays as
+   * the number of rows we are mocking.
+   * Each of those faked rows must be another associative array with the column
+   * name as the key and the value as the cell.

If you want this as two paragraphs, put a blank line in between. If it is one, wrap it as one.

Also,

   const ORIGINAL_HIGHWATER = '';

This doesn't have docs?

And

+  /**
+   * Expected results of the source parsing.
+   * @var array
+   */
   protected $expectedResults = array();

Needs a blank line before the @var.

penyaskito’s picture

Status: Needs work » Needs review
StatusFileSize
new1.54 KB
new1.78 KB

#8.1: Left as one paragraph.
#8.2: Until @chx and @andypost explained I had no idea what this meant.
#8.3: Fixed, sorry.

jhodgdon’s picture

Great!

I need someone else to verify this change:

-   * @var \Drupal\migrate\Plugin\migrate\source\d6\Comment.
+   * @var \Drupal\migrate\Plugin\migrate\source\d6\Drupal6SqlBase.
    */
   protected $source;

No idea if that is correct or not.

Everything else looks OK. Some of the wording is slightly awkward, but it's clear enough.

chx’s picture

That is correct. Comment was the first and that remained, well caught.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

OK, thanks! I'll get this committed sometime soon unless one of the other committers beats me to it.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

Status: Fixed » Closed (fixed)

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