-
Notifications
You must be signed in to change notification settings - Fork 80
BUGFIX EXTPLESK-8950 Fix case when getAll returns 1 database instead of 0 #188
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
BUGFIX EXTPLESK-8950 Fix case when getAll returns 1 database instead of 0 #188
Conversation
619c2b3 to
73c3eeb
Compare
73c3eeb to
c298f6f
Compare
c298f6f to
5166bc8
Compare
tests/DatabaseTest.php
Outdated
|
|
||
| public function testGetAllForWebspaceWithNoDatabases() | ||
| { | ||
| $webspace = static::$webspace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need for an additional variable if it's used only once on the next line. Just use it: static::$webspace->id
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #188 +/- ##
=========================================
Coverage 91.49% 91.49%
- Complexity 434 436 +2
=========================================
Files 83 83
Lines 1411 1411
=========================================
Hits 1291 1291
Misses 120 120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5166bc8 to
f57322f
Compare
When there are no databases on a domain, the API returns:
However, the getAll method returns one object with empty values (because if ($xmlResult) is always true, even when there are no DBs).