You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PHPUnit method setMethod was replaced by onlyMethod. setMethod was used to create a double of methods that exist and don't exist. Replacing all occurrences of this method, I found a test case creating mock of a method that does not exist.
The method Invitation::parseInvitation was moved to Notification::parseInvitation.
replace all occurrences of setMethod by onlyMethod
Run tests
You will receive:
1) OCA\Talk\Tests\php\Activity\Provider\InvitationTest::testParse with data set #0 ('en', true, array(23, 'test1'), array(array('actor-data'), array('call-data')))
PHPUnit\Framework\MockObject\CannotUseOnlyMethodsException: Trying to configure method "parseInvitation" with onlyMethods(), but it does not exist in class "OCA\Talk\Activity\Provider\Invitation". Use addMethods() for methods that do not exist in the class
/var/www/html/apps/spreed/tests/php/Activity/Provider/InvitationTest.php:85
/var/www/html/apps/spreed/tests/php/Activity/Provider/InvitationTest.php:142
2) OCA\Talk\Tests\php\Activity\Provider\InvitationTest::testParse with data set #1 ('de', false, array(42, 'test2'), array(array('actor-data'), array('call-unknown')))
PHPUnit\Framework\MockObject\CannotUseOnlyMethodsException: Trying to configure method "parseInvitation" with onlyMethods(), but it does not exist in class "OCA\Talk\Activity\Provider\Invitation". Use addMethods() for methods that do not exist in the class
/var/www/html/apps/spreed/tests/php/Activity/Provider/InvitationTest.php:85
/var/www/html/apps/spreed/tests/php/Activity/Provider/InvitationTest.php:142
Server configuration
PHP version: 7.4
Nextcloud Version: 23
PHPUnit version: 9.5.9
The text was updated successfully, but these errors were encountered:
The PHPUnit method
setMethod
was replaced byonlyMethod
.setMethod
was used to create a double of methods that exist and don't exist. Replacing all occurrences of this method, I found a test case creating mock of a method that does not exist.The method
Invitation::parseInvitation
was moved toNotification::parseInvitation
.More information: sebastianbergmann/phpunit#3687
Steps to reproduce
setMethod
byonlyMethod
Server configuration
PHP version: 7.4
Nextcloud Version: 23
PHPUnit version: 9.5.9
The text was updated successfully, but these errors were encountered: