Skip to content

Commit 05f5862

Browse files
committed
cleaning up config files a bit. more weeding out jackalope is needed
1 parent db37a61 commit 05f5862

File tree

6 files changed

+62
-85
lines changed

6 files changed

+62
-85
lines changed

README.md

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ clean out the jackalope references and move all jackalope specific stuff (the .j
2222
into the jackalope api-tests folder. These tests should be clean. The only relevant folders are
2323
tests and fixtures, plus the .sample files, the rest should go out of this.
2424

25-
TODO: convert all fixtures into system view to have the expected types
26-
27-
2825
## Usage
2926

3027
The phpcr-api-tests is a suite to test compliance for implementations of
@@ -34,17 +31,21 @@ the java content repository specification.
3431
You need to provide a couple of files in order to let the tests detect your
3532
implementation:
3633

37-
TODO: configuration should be handled by bootstrap and not by baseClass
3834

39-
* Copy phpunit.xml.sample to phpunit.xml and adapt if necessary. All <php /> vars beginning
40-
with "jcr." are copied to the configuration array that is passed to the functions `getJCRSession`,
41-
`getRepository` and `getFixtureLoader`.
42-
* Write your own bootstrap file. Have a look at inc/bootstrap.php.sample. You
35+
* Add the api tests as submodule of your project, for example in a folder tests/api
36+
* Copy phpunit.dist.xml to the parent folder of where you added the submodule,
37+
rename it to phpunit.xml and adapt as necessary.
38+
* All <php /> vars beginning with "jcr." are copied to the configuration array
39+
that is passed to the functions `getJCRSession`,
40+
`getRepository` and `getFixtureLoader`.
41+
TODO: configuration should be handled by bootstrap and not by baseClass
42+
* Write your own bootstrap file. Have a look at bootstrap.dist.php You
4343
have to implement the following methods:
4444
** getJCRSession()
4545
** getRepository()
4646
** getSimpleCredentials()
4747
** getFixtureLoader()
48+
TODO: make this a class and move logic for configuration into the bootstrap
4849
* Implement data for all the necessary fixtures. See the "fixtures/" folder for
4950
a JCR XML system view export of the fixture data. If your implementation can
5051
not import this format, you will need to convert them into a suitable format.
@@ -65,18 +66,6 @@ your own fixtures if you want.
6566
The test suite provides default fixtures in the fixtures folder in the JCR
6667
system view export format. It is recommended to use those.
6768

68-
Current list of fixtures (subject to be extended):
69-
70-
* general/base
71-
* general/query
72-
* 10_Writing/add
73-
* 10_Writing/copy
74-
* 10_Writing/delete
75-
* 10_Writing/move
76-
* 10_Writing/nodetype
77-
* 15_Versioning/base
78-
79-
8069

8170
### Using jackrabbit_importexport for load your own fixtures
8271

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
}
2525
}
2626

27-
/** autoloader: jackalope-api-tests relies on this autoloader.
27+
/**
28+
* autoloader: jackalope-api-tests relies on this autoloader.
2829
*/
2930
function jackalopeApiTestsAutoload($class) {
3031
$incFile = dirname(__FILE__) . '/../lib/' . str_replace("_", DIRECTORY_SEPARATOR, $class).".php";

inc/PHP_importexport.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

inc/autoload.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
/*
33
* An autoload array to enable autoloading in sf2 (jackrabbit_importexport is used
44
* in CoreBundle). Further classes can be added if needed
5+
* TODO: Temporary hack, remove once importXML is implemented and use session->importXML
56
*/
67
return array(
78
'jackrabbit_importexport' => __DIR__.'/importexport.php',
8-
);
9+
);

phpunit.dist.xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<phpunit backupGlobals="false"
2+
backupStaticAttributes="false"
3+
colors="false"
4+
convertErrorsToExceptions="true"
5+
convertNoticesToExceptions="true"
6+
convertWarningsToExceptions="true"
7+
processIsolation="false"
8+
stopOnFailure="false"
9+
syntaxCheck="true"
10+
strict="true"
11+
bootstrap="bootstrap.php">
12+
<php>
13+
<!-- set some globals for connection handling.
14+
the following is an example of the jackalope-jackrabbit implementation -->
15+
<var name="jcr.url" value="http://localhost:8080/server" />
16+
<var name="jcr.user" value="admin" />
17+
<var name="jcr.pass" value="admin" />
18+
<var name="jcr.workspace" value="tests" />
19+
<var name="jcr.transport" value="davex" />
20+
</php>
21+
22+
<testsuites>
23+
<testsuite name="all">
24+
<directory>[name-of-directory-with-test-submodule]/tests/</directory>
25+
<directory>[your-unit-tests-directory]</directory>
26+
</testsuite>
27+
</testsuites>
28+
29+
<!-- configuration for code coverage report -->
30+
<filter>
31+
<whitelist>
32+
<directory>../</directory>
33+
34+
<exclude>
35+
<!-- ignore the unit tests -->
36+
<directory>../tests</directory>
37+
38+
<!-- ignore the api tests -->
39+
<directory>.</directory>
40+
41+
<!-- ignore whats not implemented yet -->
42+
<directory>../lib/phpcr/src/PHPCR/Lock</directory>
43+
<directory>../lib/phpcr/src/PHPCR/Observation</directory>
44+
<directory>../lib/phpcr/src/PHPCR/Retention</directory>
45+
<directory>../lib/phpcr/src/PHPCR/Security</directory>
46+
</exclude>
47+
</whitelist>
48+
</filter>
49+
</phpunit>

phpunit.xml.sample

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)