r98255 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98254‎ | r98255 | r98256 >
Date:21:13, 27 September 2011
Author:jpostlethwaite
Status:deferred (Comments)
Tags:fundraising 
Comment:
Expanding unit tests for DonationInterface
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/tests/Adapter (added) (history)
  • /branches/fundraising/extensions/DonationInterface/tests/Adapter/AllTests.php (added) (history)
  • /branches/fundraising/extensions/DonationInterface/tests/AllTests.php (added) (history)
  • /branches/fundraising/extensions/DonationInterface/tests/DonationInterfaceTestCase.php (added) (history)
  • /branches/fundraising/extensions/DonationInterface/tests/TestConfiguration.php.dist (added) (history)
  • /branches/fundraising/extensions/DonationInterface/tests/TestHelper.php (added) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/tests/TestConfiguration.php.dist
@@ -0,0 +1,37 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ *
 19+ * @category UnitTesting
 20+ * @package Fundraising_QueueHandling
 21+ * @license http://www.gnu.org/copyleft/gpl.html GNU GENERAL PUBLIC LICENSE
 22+ * @since r462
 23+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 24+ */
 25+
 26+/*
 27+ * This file contains custom options and constants for test configuration.
 28+ */
 29+
 30+/**
 31+ * TESTS_MESSAGE_NOT_IMPLEMENTED
 32+ *
 33+ * Message for code that has not been implemented.
 34+ */
 35+if ( !defined( 'PHPUNIT_MAIN_METHOD' ) ) {
 36+ define( 'TESTS_MESSAGE_NOT_IMPLEMENTED', 'Not implemented yet!' );
 37+}
 38+
Index: branches/fundraising/extensions/DonationInterface/tests/Adapter/AllTests.php
@@ -0,0 +1,59 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ *
 19+ * @since r98249
 20+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 21+ */
 22+
 23+/**
 24+ * @see DonationInterface_Adapter_ServerTestCase
 25+ */
 26+require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'ServerTestCase.php';
 27+
 28+/**
 29+ * AllTests
 30+ */
 31+class DonationInterface_Adapter_AllTests
 32+{
 33+
 34+ /**
 35+ * Run the main test and load any parameters if needed.
 36+ *
 37+ */
 38+ public static function main()
 39+ {
 40+ $parameters = array();
 41+
 42+ PHPUnit_TextUI_TestRunner::run( self::suite(), $parameters );
 43+ }
 44+
 45+ /**
 46+ * Regular suite
 47+ *
 48+ * All tests except those that require output buffering.
 49+ *
 50+ * @return PHPUnit_Framework_TestSuite
 51+ */
 52+ public static function suite()
 53+ {
 54+ $suite = new PHPUnit_Framework_TestSuite( 'Donation Interface - Adapter Suite' );
 55+
 56+ //$suite->addTestSuite( 'DonationInterface_Adapter_ServerTestCase' );
 57+
 58+ return $suite;
 59+ }
 60+}
Property changes on: branches/fundraising/extensions/DonationInterface/tests/Adapter/AllTests.php
___________________________________________________________________
Added: svn:mime-type
161 + text/plain
Added: svn:keywords
262 + Author Date HeadURL Header Id Revision
Added: svn:eol-style
363 + native
Index: branches/fundraising/extensions/DonationInterface/tests/AllTests.php
@@ -0,0 +1,58 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ * @since r98249
 19+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 20+ */
 21+
 22+/**
 23+ * @see DonationInterface_Adapter_AllTests
 24+ */
 25+require_once 'Adapter/AllTests.php';
 26+
 27+/**
 28+ * AllTests
 29+ */
 30+class DonationInterface_AllTests
 31+{
 32+
 33+ /**
 34+ * Run the main test and load any parameters if needed.
 35+ *
 36+ */
 37+ public static function main()
 38+ {
 39+ $parameters = array();
 40+
 41+ PHPUnit_TextUI_TestRunner::run( self::suite(), $parameters );
 42+ }
 43+
 44+ /**
 45+ * Run test suites
 46+ *
 47+ * @return PHPUnit_Framework_TestSuite
 48+ */
 49+ public static function suite()
 50+ {
 51+ $suite = new PHPUnit_Framework_TestSuite( 'Donation Interface Suite' );
 52+
 53+ $suite->addTestSuite( 'DonationInterface_Adapter_AllTests' );
 54+ //$suite->addTest(DonationInterface_Adapter_AllTests::suite());
 55+
 56+ return $suite;
 57+ }
 58+}
 59+
Property changes on: branches/fundraising/extensions/DonationInterface/tests/AllTests.php
___________________________________________________________________
Added: svn:eol-style
160 + native
Added: svn:mime-type
261 + text/plain
Added: svn:keywords
362 + Author Date HeadURL Header Id Revision
Index: branches/fundraising/extensions/DonationInterface/tests/TestHelper.php
@@ -0,0 +1,56 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ *
 19+ * @category UnitTesting
 20+ * @package Fundraising_QueueHandling
 21+ * @license http://www.gnu.org/copyleft/gpl.html GNU GENERAL PUBLIC LICENSE
 22+ * @since r462
 23+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 24+ */
 25+
 26+/*
 27+ * Include PHPUnit dependencies
 28+ */
 29+require_once 'PHPUnit/Framework/IncompleteTestError.php';
 30+require_once 'PHPUnit/Framework/TestCase.php';
 31+require_once 'PHPUnit/Framework/TestSuite.php';
 32+require_once 'PHPUnit/Runner/Version.php';
 33+require_once 'PHPUnit/TextUI/TestRunner.php';
 34+require_once 'PHPUnit/Util/Filter.php';
 35+
 36+/*
 37+ * Set error reporting to the level to which code must comply.
 38+ */
 39+error_reporting( E_ALL | E_STRICT );
 40+
 41+
 42+/**
 43+ * @see DonationData
 44+ */
 45+require_once dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'gateway_common/DonationData.php';
 46+
 47+
 48+/*
 49+ * Load the user-defined test configuration file, if it exists; otherwise, load
 50+ * the default configuration.
 51+ */
 52+if ( is_file( 'TestConfiguration.php' ) ) {
 53+ require_once 'TestConfiguration.php';
 54+} else {
 55+ require_once 'TestConfiguration.php.dist';
 56+}
 57+
Property changes on: branches/fundraising/extensions/DonationInterface/tests/TestHelper.php
___________________________________________________________________
Added: svn:eol-style
158 + native
Added: svn:mime-type
259 + text/plain
Added: svn:keywords
360 + Author Date HeadURL Header Id Revision
Index: branches/fundraising/extensions/DonationInterface/tests/DonationInterfaceTestCase.php
@@ -0,0 +1,37 @@
 2+<?php
 3+/**
 4+ * Wikimedia Foundation
 5+ *
 6+ * LICENSE
 7+ *
 8+ * This program is free software; you can redistribute it and/or modify
 9+ * it under the terms of the GNU General Public License as published by
 10+ * the Free Software Foundation; either version 2 of the License, or
 11+ * (at your option) any later version.
 12+ *
 13+ * This program is distributed in the hope that it will be useful,
 14+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 15+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 16+ * GNU General Public License for more details.
 17+ *
 18+ * @since r98249
 19+ * @author Jeremy Postlethwaite <jpostlethwaite@wikimedia.org>
 20+ */
 21+
 22+/**
 23+ * @see TestHelper.php
 24+ */
 25+require_once dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'TestHelper.php';
 26+
 27+/**
 28+ * @group Fundraising
 29+ * @group QueueHandling
 30+ * @group ClassMethod
 31+ * @group ListenerAdapter
 32+ *
 33+ * @category UnitTesting
 34+ * @package Fundraising_QueueHandling
 35+ */
 36+abstract class DonationInterfaceTestCase extends MediaWikiTestCase
 37+{
 38+}
Property changes on: branches/fundraising/extensions/DonationInterface/tests/DonationInterfaceTestCase.php
___________________________________________________________________
Added: svn:eol-style
139 + native
Added: svn:mime-type
240 + text/plain
Added: svn:keywords
341 + Author Date HeadURL Header Id Revision

Follow-up revisions

RevisionCommit summaryAuthorDate
r98257Expanding unit tests for DonationInterfacejpostlethwaite21:14, 27 September 2011
r98261Expanding unit tests for DonationInterfacejpostlethwaite21:29, 27 September 2011
r98263Ignoring customizable file TestConfiguration.phpjpostlethwaite21:32, 27 September 2011
r98267Expanding unit tests for DonationInterfacejpostlethwaite21:38, 27 September 2011
r98269Added public declaration to methods.jpostlethwaite21:51, 27 September 2011
r98271Moved DonationDataTest.php under AllTests.phpjpostlethwaite22:02, 27 September 2011

Comments

#Comment by Jpostlethwaite (talk | contribs)   21:35, 27 September 2011

Reorganizing unit tests to allow for more unit tests for payment gateways.

#Comment by Jpostlethwaite (talk | contribs)   21:37, 27 September 2011

Revisions r98257, r98261 and r98263 are all a part of this commit.

No new unit tests have been added at this point.

#Comment by Jpostlethwaite (talk | contribs)   21:39, 27 September 2011

Revision r98267 removes some tags from comments.

#Comment by Jpostlethwaite (talk | contribs)   22:04, 27 September 2011

Revision r98269: Added public declaration to methods.

#Comment by Jpostlethwaite (talk | contribs)   22:05, 27 September 2011

Revision r98271: Moved DonationDataTest.php under AllTests.php.

Also added public declaration to methods.

Status & tagging log