Skip to content

Fix unit test function name so that test runs (and fails) #121

Description

@phil-davis

Steps to reproduce

  1. fix https://github.com/owncloud/announcementcenter/pull/20/files#diff-1879b41e5a6d3340aeaa60e56c81373fR167
    public function te1stAnnouncement() => public function testAnnouncement()
  2. make test-php-unit

Expected behaviour

Unit tests pass

Actual behaviour

make test-php-unit
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
php -d zend.enable_gc=0 "/home/phil/git/owncloud/core/apps-external/announcementcenter/../../lib/composer/bin/phpunit" --configuration ./phpunit.xml --testsuite unit
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.16-1+ubuntu18.04.1+deb.sury.org+1 with Xdebug 2.7.0
Configuration: /home/phil/git/owncloud/core/apps-external/announcementcenter/phpunit.xml

............................................................F     61 / 61 (100%)

Time: 1.61 seconds, Memory: 22.00MB

There was 1 failure:

1) OCA\AnnouncementCenter\Tests\Unit\Notification\NotifierTest::testAnnouncement
Failed asserting that null is of type "int".

/home/phil/git/owncloud/core/apps-external/announcementcenter/tests/Unit/Notification/NotifierTest.php:197

FAILURES!
Tests: 61, Assertions: 140, Failures: 1.

Generating code coverage report in Clover XML format ... done
Makefile:108: recipe for target 'test-php-unit' failed
make: *** [test-php-unit] Error 1

Note: before fixing the function name, only 60 tests are running. Test 61 has not been running.

Server configuration

git clone development environment or drone

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions