Write tests for the module

Created on 10 January 2018, almost 7 years ago
Updated 11 January 2024, 11 months ago

Need write tests for the module.

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine tibezh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Patch #4 is not applied on drupal 10, Refer to screenshot.

  • Status changed to Needs work about 1 year ago
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • Assigned to danrod
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • Status changed to Active about 1 year ago
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa

    Patch #4 looks like a php file, probably the Test Class, I'll change this.

  • Status changed to Needs work 11 months ago
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • Status changed to Active 11 months ago
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa
  • πŸ‡¨πŸ‡¦Canada danrod Ottawa

    I pushed a change for this, but I am getting this error when trying to run the test, does anyone have any idea why is this test failing?

    daniel@drupal10-2-web:/var/www/html/web/core$ ../../vendor/bin/phpunit ../modules/contrib/timepicker/tests/src/Functional/TimeTestCaseTest.php 
    PHPUnit 9.6.15 by Sebastian Bergmann and contributors.
    
    Testing Drupal\Tests\timepicker\Functional\TimeTestCaseTest
    E                                                                   1 / 1 (100%)R
    
    Time: 00:05.944, Memory: 4.00 MB
    
    There was 1 error:
    
    1) Drupal\Tests\timepicker\Functional\TimeTestCaseTest::testTheSiteStillWorks
    TypeError: Drupal\Component\DependencyInjection\ReverseContainer::generateServiceIdHash(): Argument #1 ($object) must be of type object, null given
    
    /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php:87
    /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php:75
    /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:903
    /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php:816
    /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:615
    /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:251
    /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
    /var/www/html/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:476
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:559
    /var/www/html/web/core/tests/Drupal/Tests/BrowserTestBase.php:367
    /var/www/html/web/modules/contrib/timepicker/tests/src/Functional/TimeTestCaseTest.php:31
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    --
    
    There was 1 risky test:
    
    1) Drupal\Tests\timepicker\Functional\TimeTestCaseTest::testTheSiteStillWorks
    This test did not perform any assertions
    
    /var/www/html/web/core/tests/Drupal/Tests/Listeners/DrupalListener.php:60
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:452
    /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:144
    /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php:97
    /var/www/html/vendor/bin/phpunit:122
    
    ERRORS!
    Tests: 1, Assertions: 0, Errors: 1, Risky: 1.
    
Production build 0.71.5 2024