In PHPUnit we can mock abstract classes and any methods we need, and just test the methods implemented on the abstract class.

Files: 
CommentFileSizeAuthor
#5 interdiff-2088147-5.txt701 bytesdamiankloip
#5 2088147-5.patch2.24 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 59,338 pass(es).
[ View ]
#1 2088147.patch2.17 KBdamiankloip
PASSED: [[SimpleTest]]: [MySQL] 59,433 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new2.17 KB
PASSED: [[SimpleTest]]: [MySQL] 59,433 pass(es).
[ View ]

And a patch.

Status:Needs review» Needs work
Issue tags:-phpunit

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

Status:Needs work» Needs review
Issue tags:+phpunit

#1: 2088147.patch queued for re-testing.

  1. +++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
    @@ -0,0 +1,74 @@
    + * @group Drupal

    and add @group Lock as well too?

  2. +++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
    @@ -0,0 +1,74 @@
    +  /**
    +   * @var \Drupal\Core\Lock\LockBackendAbstract|\PHPUnit_Framework_MockObject_MockObject

    lets add the one liner doc here ;)

StatusFileSize
new2.24 KB
PASSED: [[SimpleTest]]: [MySQL] 59,338 pass(es).
[ View ]
new701 bytes

Great, thank you!

Status:Needs review» Reviewed & tested by the community

Status:Reviewed & tested by the community» Needs work
Issue tags:-phpunit

The last submitted patch, 2088147-5.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+phpunit

#5: 2088147-5.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

and back

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x, thanks!

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