Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/330187 )
Change subject: DONOTMERGE: Unit test scaffolding ...................................................................... DONOTMERGE: Unit test scaffolding Change-Id: I4eebd605b9e310f58fabbb79dd5d311b87b244ed --- M tests/phpunit/includes/EditPageTest.php 1 file changed, 19 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/87/330187/1 diff --git a/tests/phpunit/includes/EditPageTest.php b/tests/phpunit/includes/EditPageTest.php index 5a01dc0..3dbf8f3 100644 --- a/tests/phpunit/includes/EditPageTest.php +++ b/tests/phpunit/includes/EditPageTest.php @@ -613,6 +613,25 @@ return array_merge( $tests, $testsWithAdam, $testsWithBerta ); } + public function provideAddWarningsToHtml() { + return [ + 'Hello', [], false, + 'Hello', [ 'warning' ], true + ]; + } + + /** + * @dataProvider provideAddWarningsToHtml + * @covers EditPage::addWarningsToHtml + */ + public function testAddWarningsToHtml( $note, $warnings, $expected ) { + $ep = new EditPage(); + $newNote = $ed->addWarningsToHtml( $note, $warnings ); + // TODO: what test can do you do here that will always ensure expected and actual are the same? + $actual = true === false; + $this->assertEquals( $expected, $actual ); + } + /** * @dataProvider provideAutoMerge * @covers EditPage -- To view, visit https://gerrit.wikimedia.org/r/330187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4eebd605b9e310f58fabbb79dd5d311b87b244ed Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits