owncloud / brute_force_protection

Brute-force protection app for ownCloud
GNU General Public License v2.0
6 stars 5 forks source link

Unit test errors with PHP 7.4 #118

Closed phil-davis closed 4 years ago

phil-davis commented 4 years ago

https://drone.owncloud.com/owncloud/brute_force_protection/914/13/4

php -d zend.enable_gc=0  "/var/www/owncloud/server/apps/brute_force_protection/../../lib/composer/bin/phpunit" --configuration ./phpunit.xml --testsuite unit
PHPUnit 8.5.4 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.4.2
Configuration: /var/www/owncloud/server/apps/brute_force_protection/phpunit.xml
Error:         No code coverage driver is available

....................E...........                                  32 / 32 (100%)

Time: 204 ms, Memory: 18.00 MB

There was 1 error:

1) OCA\BruteForceProtection\Tests\Db\FailedLoginAttemptMapperTest::testGetSuspiciousActivityCountForUidIpCombination
Trying to access array offset on value of type bool

/var/www/owncloud/server/apps/brute_force_protection/lib/Db/FailedLoginAttemptMapper.php:105
/var/www/owncloud/server/apps/brute_force_protection/lib/Db/FailedLoginAttemptMapper.php:77
/var/www/owncloud/server/apps/brute_force_protection/tests/unit/Db/FailedLoginAttemptMapperTest.php:126

ERRORS!
Tests: 32, Assertions: 60, Errors: 1.
phil-davis commented 4 years ago

Fixed in #117