Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace deprecated getMock method with mock builder #62

Merged
merged 1 commit into from
Sep 14, 2016

Conversation

ChristophWurst
Copy link
Member

Before

1) OCA\Mail\Tests\Command\CreateAccountTest::testName

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

2) OCA\Mail\Tests\Command\CreateAccountTest::testDescription

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

3) OCA\Mail\Tests\Command\CreateAccountTest::testArguments

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

4) AutoConfigControllerTest::testAutoComplete

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

5) PageControllerTest::testIndex

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

6) ProxyControllerTest::testRedirect with data set #0 ('http://nextcloud.com', false)

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

7) ProxyControllerTest::testRedirect with data set #1 ('https://nextcloud.com', false)

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

8) ProxyControllerTest::testRedirect with data set #2 ('http://example.com', true)

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

9) ProxyControllerTest::testRedirect with data set #3 ('https://example.com', true)

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

10) ProxyControllerTest::testRedirectInvalidUrl

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

11) ProxyControllerTest::testProxy

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

12) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #0 ('alert')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

13) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #1 ('warning')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

14) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #2 ('emergency')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

15) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #3 ('critical')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

16) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #4 ('error')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

17) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #5 ('notice')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

18) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #6 ('info')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

19) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #7 ('debug')

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

20) OCA\Mail\Tests\Service\LoggerTest::testLoggerMethod with data set #8 ('logException', Exception Object (...))

PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

cc @nextcloud/mail @tahaalibra @nickvergessen @rullzer

@ChristophWurst
Copy link
Member Author

After

There were 6 warnings:

1) ProxyControllerTest::testRedirect with data set #0 ('http://nextcloud.com', false)

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) ProxyControllerTest::testRedirect with data set #1 ('https://nextcloud.com', false)

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

3) ProxyControllerTest::testRedirect with data set #2 ('http://example.com', true)

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

4) ProxyControllerTest::testRedirect with data set #3 ('https://example.com', true)

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

5) ProxyControllerTest::testRedirectInvalidUrl

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

6) ProxyControllerTest::testProxy

Trying to configure method "getClient" which cannot be configured because it does not exist, has not been specified, is final, or is static

those warnings should be fixed by #30

@nickvergessen
Copy link
Member

👍

@ChristophWurst ChristophWurst merged commit f8bb1a2 into master Sep 14, 2016
@ChristophWurst ChristophWurst deleted the deprecated-phpunit-getmock branch September 14, 2016 16:34
@lock
Copy link

lock bot commented Nov 21, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and questions.

@lock lock bot locked and limited conversation to collaborators Nov 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants