kiwicommerce/magento2-admin-activity

SaveAfterTests fail on AssertNull

Closed this issue · 1 comments

SaveAfterTests fail on AssertNull

Hello,
we tried to implement your module in one of our shops. Installing over composer worked fine and all functionality seems to be there, but two of the Unit tests keep failing.

Besides that the module is really great, helps alot.

Preconditions

  1. PHP version: 7.1.23
  2. mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
  3. Magento: 2.3.0
  4. PHP Unit: 6.5.13

Steps to reproduce

Running the Unit tests

Expected result

Passing of the Unit tests.
The problem seems to be that the tested function only returns an object or true, but the test expects it to be null.

Actual result

Error log:

    • KiwiCommerce\AdminActivity\Test\Unit\Observer\SaveAfterTest::testExecute
    • Failed asserting that true is null.
    • [OURHOST]/vendor/kiwicommerce/module-admin-activity/Test/Unit/Observer/SaveAfterTest.php:109
    • KiwiCommerce\AdminActivity\Test\Unit\Observer\SaveAfterTest::testExecuteGetCheckIfIsNewReturnFalse
    • Failed asserting that true is null.
    • /vendor/kiwicommerce/module-admin-activity/Test/Unit/Observer/testExecuteGetCheckIfIsNewReturnFalse.php :157

Hi @bmatth . Thank you for your report.
The issue has been fixed
Related commit(s):

The fix will be available with the upcoming release.