Permalink
Browse files

- Merge [3942].

  • Loading branch information...
1 parent e068a1a commit a21277c72ad8eebfbd86b91a7f05257d26675617 @sebastianbergmann committed Nov 4, 2008
Showing with 8 additions and 8 deletions.
  1. +5 −5 PHPUnit/Framework/MockObject/Mock.php
  2. +1 −1 PHPUnit/Runner/StandardTestSuiteLoader.php
  3. +2 −2 PHPUnit/Util/Class.php
@@ -102,12 +102,12 @@ class PHPUnit_Framework_MockObject_Mock
public function __construct($className, $methods = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE)
{
- $classNameParts = explode('::', $className);
+ $classNameParts = explode('\\', $className);
if (count($classNameParts) > 1) {
$className = array_pop($classNameParts);
- $namespaceName = join('::', $classNameParts);
- $this->fullClassName = $namespaceName . '::' . $className;
+ $namespaceName = join('\\', $classNameParts);
+ $this->fullClassName = $namespaceName . '\\' . $className;
} else {
$namespaceName = '';
$this->fullClassName = $className;
@@ -248,14 +248,14 @@ protected function generateClassDefinition(ReflectionClass $class)
$code .= sprintf(
"%s implements %s%s {\n",
$this->mockClassName,
- !empty($this->namespaceName) ? $this->namespaceName . '::' : '',
+ !empty($this->namespaceName) ? $this->namespaceName . '\\' : '',
$this->className
);
} else {
$code .= sprintf(
"%s extends %s%s {\n",
$this->mockClassName,
- !empty($this->namespaceName) ? $this->namespaceName . '::' : '',
+ !empty($this->namespaceName) ? $this->namespaceName . '\\' : '',
$this->className
);
}
@@ -77,7 +77,7 @@ public function load($suiteClassName, $suiteClassFile = '', $syntaxCheck = TRUE)
$suiteClassName = str_replace('.php', '', $suiteClassName);
if (empty($suiteClassFile)) {
- $suiteClassFile = str_replace(array('_', '::'), DIRECTORY_SEPARATOR, $suiteClassName) . '.php';
+ $suiteClassFile = str_replace(array('_', '\\'), DIRECTORY_SEPARATOR, $suiteClassName) . '.php';
}
if (!class_exists($suiteClassName, FALSE)) {
@@ -413,7 +413,7 @@ public static function getPackageInformation($className)
if (strpos($className, ':') !== FALSE) {
$result['namespace'] = self::arrayToName(
- explode('::', $className), '::'
+ explode('\\', $className), '\\'
);
}
@@ -436,7 +436,7 @@ public static function getPackageInformation($className)
if (empty($result['fullPackage'])) {
$result['fullPackage'] = self::arrayToName(
- explode('_', str_replace('::', '_', $className)), '.'
+ explode('_', str_replace('\\', '_', $className)), '.'
);
}

0 comments on commit a21277c

Please sign in to comment.