Problem/Motivation

Add unit tests and a functional/integration test to improve code quality.

Proposed resolution

Add phpunit tests and functional simpletest.

Remaining tasks

Need to run patch through simplytest.me as d.o infrastructure won't pick up the tests until an initial test is passing.

Comments

mradcliffe created an issue. See original summary.

mradcliffe’s picture

Status: Active » Needs review
StatusFileSize
new19.58 KB

Status: Needs review » Needs work

The last submitted patch, 2: footermap-2641452-add-tests-2.patch, failed testing.

The last submitted patch, 2: footermap-2641452-add-tests-2.patch, failed testing.

mradcliffe’s picture

StatusFileSize
new19.15 KB
new10.11 KB
mradcliffe’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: footermap-2641452-add-tests-5.patch, failed testing.

The last submitted patch, 5: footermap-2641452-add-tests-5.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new19.15 KB
new476 bytes

Let's try enabling the module in the test.

Status: Needs review » Needs work

The last submitted patch, 9: footermap-2641452-add-tests-9.patch, failed testing.

The last submitted patch, 9: footermap-2641452-add-tests-9.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new19.11 KB
new790 bytes

Restoring the config settings in the test from #2.

Status: Needs review » Needs work

The last submitted patch, 12: footermap-2641452-add-tests-12.patch, failed testing.

The last submitted patch, 12: footermap-2641452-add-tests-12.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new18.98 KB
new1.64 KB

Let's try this.

Status: Needs review » Needs work

The last submitted patch, 15: footermap-2641452-add-tests-15.patch, failed testing.

The last submitted patch, 15: footermap-2641452-add-tests-15.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new19.16 KB
new1.03 KB

Status: Needs review » Needs work

The last submitted patch, 18: footermap-2641452-add-tests-18.patch, failed testing.

The last submitted patch, 18: footermap-2641452-add-tests-18.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new19.07 KB
new1.34 KB

Add menu_ui dependency to simpletest.
Exclude src/Tests from coverage.

Status: Needs review » Needs work

The last submitted patch, 21: footermap-2641452-add-tests-21.patch, failed testing.

The last submitted patch, 21: footermap-2641452-add-tests-21.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new655 bytes
new19.22 KB

Let's try this approach again even though it didn't work the last time. Maybe some magic combination will make Drupal Simpletest work.

Status: Needs review » Needs work

The last submitted patch, 24: footermap-2641452-add-tests-24.patch, failed testing.

The last submitted patch, 24: footermap-2641452-add-tests-24.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new20.27 KB
new1.04 KB

Oh, hmm... Block API changed since I first did it. Sigh.

Status: Needs review » Needs work

The last submitted patch, 27: footermap-2641452-add-tests-27.patch, failed testing.

The last submitted patch, 27: footermap-2641452-add-tests-27.patch, failed testing.

mradcliffe’s picture

Status: Needs work » Needs review
StatusFileSize
new20.36 KB
new978 bytes

Now we're getting somewhere. Let's see if going to a page fixes the xpath issue.

mradcliffe’s picture

Status: Needs review » Fixed
+++ b/src/Plugin/Block/FootermapBlock.php
@@ -50,6 +50,11 @@ class FootermapBlock extends BlockBase implements ContainerFactoryPluginInterfac
+  ¶

Fixed on commit.

  • mradcliffe committed fc6f9aa on 8.x-1.x
    Issue #2641452 by mradcliffe: Add unit and integration tests for...

Status: Fixed » Closed (fixed)

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