Skip to content

Commit

Permalink
[DoctrineBridge] DoctrineDataCollector comments the non runnable part…
Browse files Browse the repository at this point in the history
… of the query
  • Loading branch information
Amrouche Hamza committed Dec 6, 2017
1 parent b783602 commit ffc0b23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -162,8 +162,8 @@ private function sanitizeParam($var)
$className = get_class($var);

return method_exists($var, '__toString') ?
array(sprintf('Object(%s): "%s"', $className, $var->__toString()), false) :
array(sprintf('Object(%s)', $className), false);
array(sprintf('/* Object(%s): */"%s"', $className, $var->__toString()), false) :
array(sprintf('/* Object(%s) */', $className), false);
}

if (is_array($var)) {
Expand All @@ -179,7 +179,7 @@ private function sanitizeParam($var)
}

if (is_resource($var)) {
return array(sprintf('Resource(%s)', get_resource_type($var)), false);
return array(sprintf('/* Resource(%s) */', get_resource_type($var)), false);
}

return array($var, true);
Expand Down
Expand Up @@ -126,12 +126,12 @@ public function paramProvider()
array(true, array(), true, true),
array(null, array(), null, true),
array(new \DateTime('2011-09-11'), array('date'), '2011-09-11', true),
array(fopen(__FILE__, 'r'), array(), 'Resource(stream)', false),
array(new \stdClass(), array(), 'Object(stdClass)', false),
array(fopen(__FILE__, 'r'), array(), '/* Resource(stream) */', false),
array(new \stdClass(), array(), '/* Object(stdClass) */', false),
array(
new StringRepresentableClass(),
array(),
'Object(Symfony\Bridge\Doctrine\Tests\DataCollector\StringRepresentableClass): "string representation"',
'/* Object(Symfony\Bridge\Doctrine\Tests\DataCollector\StringRepresentableClass): */"string representation"',
false,
),
);
Expand Down

0 comments on commit ffc0b23

Please sign in to comment.