Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 49 lines (41 sloc) 1.347 kB
0fe57ca @indiefan Added Base Integration test class and unit testing of said class.
indiefan authored
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
4f1a9c0 @nateabele Updating copyright year.
nateabele authored
5 * @copyright Copyright 2011, Union of RAD (http://union-of-rad.org)
0fe57ca @indiefan Added Base Integration test class and unit testing of said class.
indiefan authored
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
8
9 namespace lithium\test;
10
bfbee4a @jperras Adding class doc block for `test\Integration`.
jperras authored
11 /**
12 * This is the base class for integration tests.
13 *
14 * Integration tests are for determining that different parts of the framework will work
15 * together (integrate) as expected. An example of a common integration test would be for
16 * ensuring that an adapter interacts correctly with the class it is designed to interface
17 * with. Example: the `Session` class and the `Php` adapter. Unit tests will ensure that
18 * both the `Session` and `Php` classes behave correctly under isolation, while an integration
19 * test ensures that the two classes interact and interface correctly.
20 *
21 */
0fe57ca @indiefan Added Base Integration test class and unit testing of said class.
indiefan authored
22 class Integration extends \lithium\test\Unit {
23
24 /**
bfbee4a @jperras Adding class doc block for `test\Integration`.
jperras authored
25 * Auto init for applying Integration filter to this test class.
0fe57ca @indiefan Added Base Integration test class and unit testing of said class.
indiefan authored
26 *
27 * @return void
28 */
29 protected function _init() {
30 parent::_init();
31
32 $this->applyFilter('run', function($self, $params, $chain) {
33 $before = $self->results();
34
35 $chain->next($self, $params, $chain);
36
37 $after = $self->results();
38
39 while (count($after) > count($before)) {
40 $result = array_pop($after);
41 if ($result['result'] == 'fail') {
42 return false;
43 }
44 }
45 });
46 }
47 }
48
49 ?>
Something went wrong with that request. Please try again.