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

Fix unit test problems #4406

Merged
merged 13 commits into from
Apr 21, 2017
Merged

Fix unit test problems #4406

merged 13 commits into from
Apr 21, 2017

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Apr 20, 2017

Fixes #4319

There were 9 warnings:

  1. Test\Authentication\Token\DefaultTokenProviderTest::testRenewSessionTokenWithoutPassword
    Trying to configure method "getRemember" which cannot be configured because it does not exist, has not been specified, is final, or is static

  2. Test\Authentication\Token\DefaultTokenProviderTest::testRenewSessionTokenWithPassword
    Trying to configure method "getRemember" which cannot be configured because it does not exist, has not been specified, is final, or is static

  3. Warning
    No tests found in class "Test\Share\MailNotificationsTest".

  4. Test\User\UserTest::testDeleteWithDifferentHome
    Trying to configure method "implementsActions" which cannot be configured because it does not exist, has not been specified, is final, or is static

  5. Tests\Settings\Controller\UsersControllerTest::testCreateSuccessfulWithValidEmailAdmin
    Cannot stub or mock class or interface "OC\Mail\IEMailTemplate" which does not exist

  6. Tests\Settings\Controller\UsersControllerTest::testCreateSuccessfulWithoutPasswordAndWithEmail
    Cannot stub or mock class or interface "OC\Mail\IEMailTemplate" which does not exist

  7. OCA\Files_Sharing\Tests\Controller\ShareAPIControllerTest::testCanAccessShare
    PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead

  8. OCA\Theming\Tests\Controller\IconControllerTest::testGetFaviconFail
    Trying to configure method "shouldReplaceIcons" which cannot be configured because it does not exist, has not been specified, is final, or is static

  9. OCA\Theming\Tests\Controller\IconControllerTest::testGetTouchIconFail
    Trying to configure method "shouldReplaceIcons" which cannot be configured because it does not exist, has not been specified, is final, or is static

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
…d results

See http://php.net/manual/en/function.restore-error-handler.php#120879
for more information.

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Trying to configure method "getRemember" which cannot be configured
because it does not exist, has not been specified, is final, or is
static

Signed-off-by: Joas Schilling <coding@schilljs.com>
> No tests found in class "Test\Share\MailNotificationsTest".

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@mention-bot
Copy link

@nickvergessen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @rullzer and @schiessle to be potential reviewers.

@nickvergessen nickvergessen added this to the Nextcloud 12.0 milestone Apr 20, 2017
@nickvergessen nickvergessen added the 2. developing Work in progress label Apr 20, 2017
Trying to configure method "shouldReplaceIcons" which cannot be configured
because it does not exist, has not been specified, is final, or is static

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
PHP Warning:  Declaration of PublicCalendarTest::testPrivateClassification()
should be compatible with CalendarTest::testPrivateClassification($expectedChildren, $isShared)
in apps/dav/tests/unit/CalDAV/PublicCalendarTest.php on line 29

Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good

@codecov
Copy link

codecov bot commented Apr 20, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@140580f). Click here to learn what that means.
The diff coverage is 33.33%.

@@            Coverage Diff            @@
##             master    #4406   +/-   ##
=========================================
  Coverage          ?   54.18%           
  Complexity        ?    21635           
=========================================
  Files             ?     1327           
  Lines             ?    82773           
  Branches          ?     1311           
=========================================
  Hits              ?    44850           
  Misses            ?    37923           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
apps/theming/lib/Controller/IconController.php 72.85% <0%> (ø) 14 <0> (?)
settings/Controller/CheckSetupController.php 70.52% <0%> (ø) 56 <7> (?)
lib/public/Defaults.php 15.78% <100%> (ø) 19 <2> (?)

@MorrisJobke
Copy link
Member

@nickvergessen I think this one is good for review 👍

cc @rullzer @schiessle @LukasReschke

@MorrisJobke MorrisJobke added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 20, 2017
@rullzer rullzer merged commit e9b00f8 into master Apr 21, 2017
@rullzer rullzer deleted the fix-unit-test-problems branch April 21, 2017 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants