@yonas.legesse, please see #4 again. You haven't changed the code in DOComput...

Contribution Date
Technology
Contribution Project
Contribution Details

@yonas.legesse, please see #4 again. You haven't changed the code in DOComputedFields.php to call `getValue` rather than reading the `value` property. It's on line 30 and the reason for this failure. More comments below:

  1. +++ b/tests/src/Kernel/DOComputedFieldsTest.php @@ -0,0 +1,80 @@ + $field_types = ['contributions', 'country', 'first_name', + 'irc_nick', 'languages', 'last_name', 'websites', + ];

    We don't need this at all. The assertions below can directly use the string.

  2. +++ b/tests/src/Kernel/DOComputedFieldsTest.php @@ -0,0 +1,80 @@ + $value->value = "hussainweb";

    Mocks can only mock methods, not properties.

  3. +++ b/tests/src/Kernel/DOComputedFieldsTest.php @@ -0,0 +1,80 @@ + $this->typed_data = $this->getMockBuilder('\Drupal\Core\TypedData\TypedDataInterface')

    Let's stick to using prophecy everywhere.

  4. +++ b/tests/src/Kernel/DOComputedFieldsTest.php @@ -0,0 +1,80 @@ + ->expects($this->once())

    If we remove this, can we reuse the mock for all the assertions? I am not sure I like a helper method just to create this mock.

Issue Status
Needs work
Contribution Author
Files count
0
Patches count
0