Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 24 lines (22 sloc) 0.627 kb
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
1 <?php
2 /**
3 * Light wrapper around {@link PHPUnit_Framework_TestSuite}
4 * which allows to have {@link setUp()} and {@link tearDown()}
5 * methods which are called just once per suite, not once per
6 * test method in each suite/case.
7 *
f07258f @simonwelsh MINOR Update @package values to match renaming sapphire
simonwelsh authored
8 * @package framework
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
9 * @subpackage testing
10 */
11 class SapphireTestSuite extends PHPUnit_Framework_TestSuite {
e2f073f @chillu Method visibility according to coding conventions
chillu authored
12 public function setUp() {
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
13 foreach($this->groups as $group) {
093da75 @chillu API CHANGE: Renamed SapphireTest::set_up_once/tear_down_once to setUpOnc...
chillu authored
14 if($group[0] instanceof SapphireTest) $group[0]->setUpOnce();
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
15 }
16 }
17
e2f073f @chillu Method visibility according to coding conventions
chillu authored
18 public function tearDown() {
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
19 foreach($this->groups as $group) {
093da75 @chillu API CHANGE: Renamed SapphireTest::set_up_once/tear_down_once to setUpOnc...
chillu authored
20 if($group[0] instanceof SapphireTest) $group[0]->tearDownOnce();
228b976 @chillu ENHANCEMENT Adding SapphireTest::set_up_once() and SapphireTest::tear_do...
chillu authored
21 }
22 }
23 }
Something went wrong with that request. Please try again.