stable

Clone or download

Read-only

request #13007: Some PHPUnit unit tests do not properly "close" Mockery

As the result the expection count per test can be incorrect and tests can fail if they assert no expectation. This contribution fixes the impacted tests and makes sure it can not happen again. Tests using Mockery and not calling Mockery::close() at the end will be marked as failed. Change-Id: I6bc11ddb1735db2586abb4918aa7774c586204c9

Modified Files

Name
M plugins/cardwall/phpunit/Cardwall/OnTop/Config/ColumnFactoryTest.php +4 −4 Go to diff View file
M plugins/docman/phpunit/ExternalLinks/ExternalLinkParametersExtractorTest.php +2 −0 Go to diff View file
M plugins/docman/phpunit/ExternalLinks/ExternalLinkRedirectorTest.php +3 −0 Go to diff View file
M plugins/docman/phpunit/REST/v1/MetadataRepresentationBuilderTest.php +2 −0 Go to diff View file
M plugins/git/phpunit/CommitStatus/CommitStatusWithKnownStatusTest.php +4 −1 Go to diff View file
M plugins/git/phpunit/Git/Repository/LargestObjectSizeGitRepositoryTest.php +3 −0 Go to diff View file
M plugins/git/phpunit/Git/Repository/View/FilesHeaderPresenterBuilderTest.php +4 −1 Go to diff View file
M plugins/git/phpunit/GitRoutingTest.php +4 −1 Go to diff View file
M plugins/git/phpunit/SystemEvents/SystemEvent_GIT_GERRIT_PROJECT_DELETETest.php +3 −1 Go to diff View file
M plugins/gitlfs/phpunit/LFSObject/LFSObjectRetrieverTest.php +3 −0 Go to diff View file
M plugins/hudson/phpunit/HudsonJobFactoryTest.php +3 −1 Go to diff View file
M plugins/openidconnectclient/phpunit/Authentication/UserInfo/UserInfoRequestCreatorTest.php +4 −1 Go to diff View file
M plugins/timetracking/phpunit/Time/TimetrackingOverviewRepresentationsBuilderTest.php +5 −2 Go to diff View file
M plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/CIBuildJsonParserTest.php +2 −0 Go to diff View file
M plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/SetDateValueJsonParserTest.php +2 −0 Go to diff View file
M plugins/tracker/phpunit/REST/v1/Workflow/PostAction/Update/SetFloatValueJsonParserTest.php +2 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker/Action/Move/FeedbackFieldCollectorTest.php +2 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/Artifact/ExistingArtifactSourceIdFromTrackerExtractorTest.php +4 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/Artifact/XMLArtifactSourcePlatformExtractorTest.php +4 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/Notifications/CollectionOfUserInvolvedInNotificationPresenterBuilderTest.php +4 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/TrackerXMLFieldMappingFromExistingTrackerTest.php +3 −1 Go to diff View file
M plugins/tracker/phpunit/Tracker/Workflow/PostAction/Update/PostActionCollectionTest.php +2 −0 Go to diff View file
M plugins/tracker/phpunit/Tracker_FormElement_Field_List_Bind_UsersTest.php +3 −1 Go to diff View file
M tests/phpunit/phpunit.xml +3 −0 Go to diff View file