Skip to content

Commit 8bab3e0

Browse files
dantleechdbu
authored andcommitted
Switched back to inc/ for BC
1 parent 8c0458d commit 8bab3e0

File tree

83 files changed

+282
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+282
-283
lines changed

.php_cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
$header = <<<EOF
44
This file is part of the PHPCR API Tests package
55
6-
Copyright (c) 2013 Liip and others
6+
Copyright (c) 2015 Liip and others
77
88
For the full copyright and license information, please view the LICENSE
99
file that was distributed with this source code.
@@ -17,7 +17,6 @@ return Symfony\CS\Config\Config::create()
1717
'-psr0',
1818
'psr4',
1919
'symfony',
20-
'concat_with_spaces',
2120
'concat_without_spaces',
2221
'-phpdoc_indent',
2322
'-phpdoc_params',

bootstrap.dist.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -49,11 +49,11 @@
4949
* you can do things here like registering your autoloader
5050
* or require files with classes that are used but not autoloaded
5151
*/
52-
require __DIR__ . '/../src/Jackalope/autoloader.php';
52+
require __DIR__.'/../src/Jackalope/autoloader.php';
5353

5454
### Load two classes needed for jackalope unit tests ###
55-
require __DIR__ . '/../tests/Jackalope/TestCase.php';
56-
require __DIR__ . '/../tests/Jackalope/Transport/DoctrineDBAL/DoctrineDBALTestCase.php';
55+
require __DIR__.'/../tests/Jackalope/TestCase.php';
56+
require __DIR__.'/../tests/Jackalope/Transport/DoctrineDBAL/DoctrineDBALTestCase.php';
5757

5858
### Load the implementation loader class ###
5959
require 'ImplementationLoader.php';

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"autoload": {
3434
"psr-4": {
35-
"PHPCR\\Test\\": "lib/",
35+
"PHPCR\\Test\\": "inc/",
3636
"PHPCR\\Tests\\": "tests/"
3737
}
3838
},

lib/AbstractLoader.php renamed to inc/AbstractLoader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

lib/BaseCase.php renamed to inc/BaseCase.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -128,14 +128,14 @@ protected function setUp()
128128
$chapter = '';
129129

130130
for ($i = 2; $i < $case_n; $i++) {
131-
$chapter .= $parts[$i] . '\\';
131+
$chapter .= $parts[$i].'\\';
132132
}
133133

134-
$case = $chapter . $case;
135-
$test = "$case::" . $this->getName();
134+
$case = $chapter.$case;
135+
$test = "$case::".$this->getName();
136136

137137
if (!self::$loader->getTestSupported($chapter, $case, $test)) {
138-
$this->markTestSkipped('Test ' . $this->getName() . ' not supported by this implementation');
138+
$this->markTestSkipped('Test '.$this->getName().' not supported by this implementation');
139139
}
140140

141141
$this->sharedFixture = self::$staticSharedFixture;
@@ -277,7 +277,7 @@ protected function assertSimilarDateTime($expected, $data)
277277
$this->assertInstanceOf('\DateTime', $expected);
278278
$this->assertInstanceOf('\DateTime', $data);
279279
$this->assertTrue(abs($expected->getTimestamp() - $data->getTimestamp()) <= 3,
280-
$data->format('c') . ' is not close to the expected ' . $expected->format('c')
280+
$data->format('c').' is not close to the expected '.$expected->format('c')
281281
);
282282
}
283283

@@ -291,7 +291,7 @@ protected function assertSimilarDateTime($expected, $data)
291291
protected function skipIfNotSupported($descriptor)
292292
{
293293
if (false === $this->session->getRepository()->getDescriptor($descriptor)) {
294-
$this->markTestSkipped('Descriptor "' . $descriptor . '" not supported');
294+
$this->markTestSkipped('Descriptor "'.$descriptor.'" not supported');
295295
}
296296

297297
return true;

lib/FixtureLoaderInterface.php renamed to inc/FixtureLoaderInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/RepositoryDescriptorsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/RepositoryFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/RepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/SessionReadMethodsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/SimpleCredentialsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Connecting/WorkspaceReadMethodsTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.

tests/Export/ExportRepositoryContentTest.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
* This file is part of the PHPCR API Tests package
55
*
6-
* Copyright (c) 2013 Liip and others
6+
* Copyright (c) 2015 Liip and others
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
@@ -35,7 +35,7 @@ public function testExportSystemView()
3535
$output->loadXML(stream_get_contents($stream));
3636
$expected = new DOMDocument();
3737
$expected->preserveWhiteSpace = false;
38-
$expected->load(__DIR__ . '/../../fixtures/07_Export/systemview.xml');
38+
$expected->load(__DIR__.'/../../fixtures/07_Export/systemview.xml');
3939
fclose($stream);
4040
$this->assertEquivalentSystem($expected->documentElement, $output->documentElement, new DOMXPath($output));
4141
}
@@ -55,12 +55,12 @@ private function buildPath(DOMNode $n)
5555
if ($name == null) {
5656
$elem = 'sv:node(unnamed)';
5757
} else {
58-
$elem = $n->tagName . '(' . $name->value . ')';
58+
$elem = $n->tagName.'('.$name->value.')';
5959
}
6060
} else {
6161
$elem = $n->nodeName;
6262
}
63-
$ret = $elem . '/' . $ret;
63+
$ret = $elem.'/'.$ret;
6464
$n = $n->parentNode;
6565
}
6666

@@ -85,7 +85,7 @@ private function assertEquivalentSystem(DOMElement $expected, DOMElement $output
8585
foreach ($expected->attributes as $attr) {
8686
//i.e. sv:name attribute
8787
$oattr = $output->attributes->getNamedItem($attr->name);
88-
$this->assertNotNull($oattr, 'missing attribute ' . $attr->name);
88+
$this->assertNotNull($oattr, 'missing attribute '.$attr->name);
8989
$this->assertEquals($attr->value, $oattr->value, 'wrong attribute value');
9090
}
9191

@@ -97,12 +97,12 @@ private function assertEquivalentSystem(DOMElement $expected, DOMElement $output
9797
foreach ($expected->childNodes as $index => $child) {
9898
$this->assertEquals('sv:value', $child->tagName);
9999
$o = $output->childNodes->item($index);
100-
$this->assertInstanceOf('DOMElement', $o, "No child element at $index in " . $this->buildPath($child));
101-
$this->assertEquals('sv:value', $o->tagName, 'Unexpected tag name at ' . $this->buildPath($expected) . "sv:value[$index]");
100+
$this->assertInstanceOf('DOMElement', $o, "No child element at $index in ".$this->buildPath($child));
101+
$this->assertEquals('sv:value', $o->tagName, 'Unexpected tag name at '.$this->buildPath($expected)."sv:value[$index]");
102102
if ($this->isDate($child->textContent) && $this->isDate($o->textContent)) {
103-
$this->assertEqualDateString($child->textContent, $o->textContent, 'Not the same date at ' . $this->buildPath($output) . "sv:value[$index]");
103+
$this->assertEqualDateString($child->textContent, $o->textContent, 'Not the same date at '.$this->buildPath($output)."sv:value[$index]");
104104
} else {
105-
$this->assertEquals($child->textContent, $o->textContent, 'Not the same text at ' . $this->buildPath($output) . "sv:value[$index]");
105+
$this->assertEquals($child->textContent, $o->textContent, 'Not the same text at '.$this->buildPath($output)."sv:value[$index]");
106106
}
107107
}
108108
}
@@ -111,8 +111,8 @@ private function assertEquivalentSystem(DOMElement $expected, DOMElement $output
111111
foreach ($expected->childNodes as $child) {
112112
$this->assertContains($child->tagName, array('sv:property', 'sv:node'), 'unexpected child of sv:node');
113113
$childname = $child->attributes->getNamedItem('name')->value;
114-
$q = $oxpath->query($child->tagName . '[@sv:name="' . $childname . '"]', $output);
115-
$this->assertEquals(1, $q->length, 'expected to find exactly one node named ' . $childname . ' under ' . $this->buildPath($output));
114+
$q = $oxpath->query($child->tagName.'[@sv:name="'.$childname.'"]', $output);
115+
$this->assertEquals(1, $q->length, 'expected to find exactly one node named '.$childname.' under '.$this->buildPath($output));
116116
$this->assertEquivalentSystem($child, $q->item(0), $oxpath);
117117
}
118118
}
@@ -128,7 +128,7 @@ public function testExportDocumentView()
128128
$output->loadXML(stream_get_contents($stream));
129129
$expected = new DOMDocument();
130130
$expected->preserveWhiteSpace = false;
131-
$expected->load(__DIR__ . '/../../fixtures/07_Export/documentview.xml');
131+
$expected->load(__DIR__.'/../../fixtures/07_Export/documentview.xml');
132132
fclose($stream);
133133
$this->assertEquivalentDocument($expected->documentElement, $output->documentElement, new DOMXPath($output));
134134
}
@@ -142,7 +142,7 @@ public function testExportDocumentView()
142142
private function assertEquivalentDocument(DOMElement $expected, DOMElement $output, DOMXPath $oxpath)
143143
{
144144
if ($expected instanceof DOMText) {
145-
$this->assertEquals($expected->textContent, $output->textContent, 'Not the same text at ' . $this->buildPath($expected));
145+
$this->assertEquals($expected->textContent, $output->textContent, 'Not the same text at '.$this->buildPath($expected));
146146
} elseif ($expected instanceof DOMElement) {
147147
$this->assertEquals($expected->tagName, $output->tagName);
148148

@@ -151,18 +151,18 @@ private function assertEquivalentDocument(DOMElement $expected, DOMElement $outp
151151
$this->assertNotEmpty($attr->value);
152152
} else {
153153
$oattr = $output->attributes->getNamedItem($attr->name);
154-
$this->assertNotNull($oattr, 'missing attribute ' . $attr->name . ' at ' . $this->buildPath($expected));
154+
$this->assertNotNull($oattr, 'missing attribute '.$attr->name.' at '.$this->buildPath($expected));
155155
if ($this->isDate($attr->value) && $this->isDate($oattr->value)) {
156-
$this->assertEqualDateString($attr->value, $oattr->value, 'wrong attribute value at ' . $this->buildPath($expected) . '/' . $attr->name);
156+
$this->assertEqualDateString($attr->value, $oattr->value, 'wrong attribute value at '.$this->buildPath($expected).'/'.$attr->name);
157157
} else {
158-
$this->assertEquals($attr->value, $oattr->value, 'wrong attribute value at ' . $this->buildPath($expected) . '/' . $attr->name);
158+
$this->assertEquals($attr->value, $oattr->value, 'wrong attribute value at '.$this->buildPath($expected).'/'.$attr->name);
159159
}
160160
}
161161
}
162162

163163
foreach ($expected->childNodes as $child) {
164164
$q = $oxpath->query($child->tagName, $output); //TODO: same-name siblings
165-
$this->assertEquals(1, $q->length, 'expected to find exactly one node named ' . $child->tagName . ' under ' . $this->buildPath($expected));
165+
$this->assertEquals(1, $q->length, 'expected to find exactly one node named '.$child->tagName.' under '.$this->buildPath($expected));
166166
$this->assertEquivalentDocument($child, $q->item(0), $oxpath);
167167
}
168168
}

0 commit comments

Comments
 (0)