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 |
1 | 61 | + text/plain |
Added: svn:keywords |
2 | 62 | + Author Date HeadURL Header Id Revision |
Added: svn:eol-style |
3 | 63 | + 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 |
1 | 60 | + native |
Added: svn:mime-type |
2 | 61 | + text/plain |
Added: svn:keywords |
3 | 62 | + 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 |
1 | 58 | + native |
Added: svn:mime-type |
2 | 59 | + text/plain |
Added: svn:keywords |
3 | 60 | + 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 |
1 | 39 | + native |
Added: svn:mime-type |
2 | 40 | + text/plain |
Added: svn:keywords |
3 | 41 | + Author Date HeadURL Header Id Revision |