Skip to content

Commit

Permalink
Tidy up.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 24, 2006
1 parent 6028e1b commit d56c71e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions PHPUnit/Framework/TestSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ public function __construct($theClass = '', $name = '')

$constructor = $theClass->getConstructor();

if ($constructor === NULL ||
if ($constructor !== NULL &&
!$constructor->isPublic()) {
$this->addTest(
self::warning(
sprintf(
'Class %s has no public constructor',
'Class "%s" has no public constructor.',

$theClass->getName()
)
Expand All @@ -204,7 +204,7 @@ public function __construct($theClass = '', $name = '')
$this->addTest(
self::warning(
sprintf(
'No tests found in %s',
'No tests found in class "%s".',

$theClass->getName()
)
Expand Down Expand Up @@ -333,7 +333,9 @@ public function addTestFile($filename)

if (!$testsFound) {
$this->addTest(
new PHPUnit_Framework_Warning('No tests found in file ' . $filename)
new PHPUnit_Framework_Warning(
'No tests found in file "' . $filename . '".'
)
);
}

Expand Down Expand Up @@ -388,7 +390,7 @@ public static function createTest(ReflectionClass $theClass, $name)
if (!$theClass->isInstantiable()) {
return self::warning(
sprintf(
'Cannot instantiate test case %s.',
'Cannot instantiate class "%s".',
$theClass->getName()
)
);
Expand All @@ -415,7 +417,7 @@ public static function createTest(ReflectionClass $theClass, $name)
else {
return self::warning(
sprintf(
'Constructor of class %s is not TestCase($name) or TestCase().',
'Constructor of class "%s" is not TestCase($name) or TestCase().',
$theClass->getName()
)
);
Expand Down Expand Up @@ -577,7 +579,7 @@ private function addTestMethod(ReflectionMethod $method, Array &$names, Reflecti
$this->addTest(
self::warning(
sprintf(
'Test method is not public: %s',
'Test method "%s" is not public.',

$name
)
Expand Down

0 comments on commit d56c71e

Please sign in to comment.