File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,38 @@ make clean > /dev/null && make all > /dev/null && make install
23
23
24
24
## Testing
25
25
26
+ The extension's test use the PHPT format from PHP internals. This format is
27
+ documented in the following links:
28
+
29
+ * [ Introduction to PHPT Files] ( https://qa.php.net/write-test.php )
30
+ * [ PHPT - Test File Layout] ( https://qa.php.net/phpt_details.php )
31
+
32
+ Generally, most tests will be based on the following template:
33
+
34
+ ```
35
+ --TEST--
36
+ Description of API or JIRA issue being tested
37
+ --SKIPIF--
38
+ <?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
39
+ <?php /* One or more skip functions */ ?>
40
+ --FILE--
41
+ <?php
42
+ require_once __DIR__ . "/../utils/basic.inc";
43
+
44
+ // Test code
45
+
46
+ ?>
47
+ ===DONE===
48
+ <?php exit(0); ?>
49
+ --EXPECT--
50
+ ===DONE===
51
+ ```
52
+
53
+ The ` basic-skipif.inc ` and ` basic.inc ` files contain utility functions for the
54
+ ` SKIPIF ` and ` FILE ` sections, respectively. If those functions are not needed
55
+ (e.g. skip logic only depends on checking the ` PHP_INT_SIZE ` constant), the test
56
+ should not include the file. When it doubt, keep it simple.
57
+
26
58
### Local Mongo Orchestration (and Travis CI)
27
59
28
60
The test suite depends on [ Mongo Orchestration] ( https://github.com/10gen/mongo-orchestration ) .
You can’t perform that action at this time.
0 commit comments