1 | <?PHP
|
---|
2 |
|
---|
3 | /* RDFInt.php - RDF Interfaces for PHP
|
---|
4 | * Copyright 2011 netlabs.org
|
---|
5 | * Author: Christian Langanke, Adrian Gschwend
|
---|
6 | *
|
---|
7 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
8 | * you may not use this file except in compliance with the License.
|
---|
9 | * You may obtain a copy of the License at
|
---|
10 | *
|
---|
11 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
12 | *
|
---|
13 | * Unless required by applicable law or agreed to in writing, software
|
---|
14 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
16 | * See the License for the specific language governing permissions and
|
---|
17 | * limitations under the License.
|
---|
18 | */
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * @page page_option_unittest Option: Executing RDFint.PHP unittests
|
---|
22 | *
|
---|
23 | * \section sec_unittest_prerequisites Prerequisites
|
---|
24 | *
|
---|
25 | * For running the unittests, \c PHPUnit is required.
|
---|
26 | * Install as described at:
|
---|
27 | * \htmllinkext{ http://www.phpunit.de/manual/current/en/installation.html}
|
---|
28 | *
|
---|
29 |
|
---|
30 | * \note For execution of the unittests, \c GNU \c make is being used.
|
---|
31 | * Under Windows operating systems,
|
---|
32 | * \htmllinkext{http://ftp.gnu.org/gnu/make/,GNU make} needs to be installed on your system.
|
---|
33 | * Just place \c make.exe into a directory specified in your \c PATH environment variable.
|
---|
34 | *
|
---|
35 | * The unittest \c rdfa_parse_sparql requires a locally installed \c SPARQL \c endpoint.
|
---|
36 | * You may want to use the open source edition of \c Virtuoso for this. \n
|
---|
37 | * Download from: \htmllinkext{http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload} \n
|
---|
38 | * For usage under Windows operating systems, install \c Virtuoso as described at:
|
---|
39 | * \htmllinkext{http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSUsageWindows} \n
|
---|
40 | * and launch the test instcance.
|
---|
41 | *
|
---|
42 | * <!-- ========================================================================== -->
|
---|
43 | * <hr>
|
---|
44 | *
|
---|
45 | * \section sec_unittest_all Implementation of unittests
|
---|
46 | *
|
---|
47 | * The unittests are provided in subdirectories below the \c unittest directory,
|
---|
48 | * where the name of the subdirectory represents the name of the unittest. An exception
|
---|
49 | * to this rule are unittests related to the \c RDF \c Test \c Cases of \c W3C, they are
|
---|
50 | * implemented by a unittest in a single subdirectory.
|
---|
51 | *
|
---|
52 | * Unittests are implemented in the file \c unittest.php within the respective unittest subdirectory.
|
---|
53 | *
|
---|
54 | * \subsection sec_unittest_all_w3c Unittests related to RDF Test Cases
|
---|
55 | *
|
---|
56 | * \libname comes with support for selected testcases of the \c RDF \c Test \c Cases of the \c W3C,
|
---|
57 | * see \htmllinkext{http://www.w3.org/TR/rdf-testcases/} for details. Supported are
|
---|
58 | * most of the so-called \c Positive \c parser \c tests.
|
---|
59 | *
|
---|
60 | * All of these unittests are executed by a single unittest
|
---|
61 | * in the subdirectory \c rdftestcases below the \c unittest directory.
|
---|
62 | * The name of the \c RDF \c Test \c Case is provided by the makefile, setting the
|
---|
63 | * name as the value of the environment variable \c TESTCASE.
|
---|
64 | *
|
---|
65 | * \note Executing \c RDF \c Test\c Cases in fact tests the underlying library used
|
---|
66 | * for parsing and serializing RDF data (currently ARC2). If a test fails, it is most likely
|
---|
67 | * the error of the underlying library and not of \libname.
|
---|
68 | *
|
---|
69 | *
|
---|
70 | * <!-- ========================================================================== -->
|
---|
71 | * <hr>
|
---|
72 | *
|
---|
73 | * \section sec_unittest_available Determine available unittests
|
---|
74 | *
|
---|
75 | * Execute \code make list \endcode in the \c unittest directory to determine available
|
---|
76 | * unittests.
|
---|
77 | *
|
---|
78 | * \section sec_unittest_executing Executing unittests
|
---|
79 | *
|
---|
80 | * For executing testcases, execute \code make <target> \endcode in the
|
---|
81 | * directory \c unittest.
|
---|
82 | *
|
---|
83 | * The available make targets can be shown by executing \c make with no target:
|
---|
84 | \verbatim
|
---|
85 | makefile for unittests of RDFInt.PHP
|
---|
86 |
|
---|
87 | Valid targets/symbols:
|
---|
88 |
|
---|
89 | help - display this help
|
---|
90 | list - list names of testcases
|
---|
91 |
|
---|
92 | all - execute all unittests (lib && rdf)
|
---|
93 |
|
---|
94 | lib - execute all library specific unittests
|
---|
95 | lib TESTCASE=<name> - execute given library specific unittests
|
---|
96 |
|
---|
97 | rdf - execute all of selected unitests related to W3C RDF Test Cases
|
---|
98 | rdf TESTCASE=<name> - execute given unittest related to W3C RDF Test Case
|
---|
99 |
|
---|
100 | For information on RDF Test Cases see: http://www.w3.org/TR/rdf-testcases/
|
---|
101 | \endverbatim
|
---|
102 | *
|
---|
103 | * As an alternative, testcases can also be executed within the testcase directory by executing
|
---|
104 | *
|
---|
105 | * \code phpunit unittest.php \endcode
|
---|
106 | *
|
---|
107 | * \note For running one of the supported tests of \c RDF \c Testcases, before running the test,
|
---|
108 | * the name of the test must be set in the environment variable \c TESTCASE.
|
---|
109 | * Execute \code make list \endcode in the \c unittest directory to determine the name of one
|
---|
110 | * of the supported \c RDF \c Testcases.
|
---|
111 | *
|
---|
112 | */
|
---|
113 |
|
---|
114 |
|
---|
115 | ?>
|
---|