Skip to content

Commit

Permalink
Style correction and fix to existing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarcher committed Nov 2, 2015
1 parent 79c476c commit 3a827f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions lib/Doctrine/ODM/PHPCR/Tools/Helper/UniqueNodeTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ public static function checkNodeTypeMappings(DocumentManagerInterface $documentM
$knownNodeTypes[$classMetadata->getNodeType()] = $classMetadata->name;

if (!is_null($output)) {

$output->writeln(sprintf(
'The document <info>%s</info> uses %snode type <info>%s</info>',
$classMetadata->name,
$classMetadata->hasUniqueNodeType() ? '<comment>uniquely mapped</comment> ' : '',
$classMetadata->getNodeType()
));

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function testComposite()

switch ($qb->getQuery()->getLanguage()) {
case 'JCR-SQL2':
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE ((a.username = 'dtl' OR a.username = 'js') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE ((a.[username] = 'dtl' OR a.[username] = 'js') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
break;
case 'sql':
$query = "SELECT s FROM nt:unstructured AS a WHERE (a.username = 'dtl' OR a,username = 'js')";
Expand All @@ -193,7 +193,7 @@ public function testComposite()

switch ($qb->getQuery()->getLanguage()) {
case 'JCR-SQL2':
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE (((a.username = 'dtl' OR a.username = 'js') AND a.name = 'foobar') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE (((a.[username] = 'dtl' OR a.[username] = 'js') AND a.[name] = 'foobar') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
break;
case 'sql':
$this->markTestIncomplete('Not testing SQL for sql query language');
Expand All @@ -212,7 +212,7 @@ public function testComposite()

switch ($qb->getQuery()->getLanguage()) {
case 'JCR-SQL2':
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE ((((a.username = 'dtl' OR a.username = 'js') AND a.name = 'foobar') OR a.name = 'johnsmith') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
$query = "SELECT a.* FROM [nt:unstructured] AS a WHERE ((((a.[username] = 'dtl' OR a.[username] = 'js') AND a.[name] = 'foobar') OR a.[name] = 'johnsmith') AND (a.[phpcr:class] = 'Doctrine\Tests\Models\Blog\User' OR a.[phpcr:classparents] = 'Doctrine\Tests\Models\Blog\User'))";
break;
case 'sql':
$this->markTestIncomplete('Not testing SQL for sql query language');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ public function testCheckNodeTypeMappingsWithoutDuplicate()

UniqueNodeTypeHelper::checkNodeTypeMappings($documentManager);
}
}
}

0 comments on commit 3a827f3

Please sign in to comment.