Skip to content

Commit

Permalink
Renamed folders "Cake" to "src" and "Test" to "tests".
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jan 9, 2014
1 parent 4a3a6a6 commit fb72c03
Show file tree
Hide file tree
Showing 978 changed files with 34 additions and 29 deletions.
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -27,11 +27,11 @@
},
"autoload": {
"psr-4": {
"Cake\\": "Cake",
"Cake\\Test\\": "Test"
"Cake\\": "src",
"Cake\\Test\\": "tests"
}
},
"bin": [
"Cake/Console/cake"
"src/Cake/Console/cake"
]
}
8 changes: 4 additions & 4 deletions phpunit.xml.dist
Expand Up @@ -5,7 +5,7 @@
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="./Test/init.php"
bootstrap="./tests/init.php"
>
<php>
<ini name="memory_limit" value="-1"/>
Expand All @@ -14,14 +14,14 @@

<testsuites>
<testsuite name="CakePHP Test Suite">
<directory>./Test/TestCase/</directory>
<directory>./tests/TestCase/</directory>
</testsuite>
<testsuite name="Database Test Suite">
<file>./Test/TestCase/DatabaseSuite.php</file>
<file>./tests/TestCase/DatabaseSuite.php</file>
</testsuite>
</testsuites>
<listeners>
<listener class="\Cake\TestSuite\Fixture\FixtureInjector" file="./Cake/TestSuite/Fixture/FixtureInjector.php">
<listener class="\Cake\TestSuite\Fixture\FixtureInjector" file="./src/TestSuite/Fixture/FixtureInjector.php">
<arguments>
<object class="\Cake\TestSuite\Fixture\FixtureManager" />
</arguments>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -379,7 +379,7 @@ protected function _mapFileToCase($file, $category, $throwOnMissingFile = true)
$testCase = str_replace(DS, '/', $file);
$testCase = preg_replace('@.*lib/Cake/@', '', $file);
$testCase[0] = strtoupper($testCase[0]);
$testFile = ROOT . '/Test/TestCase/' . $testCase . 'Test.php';
$testFile = ROOT . '/tests/TestCase/' . $testCase . 'Test.php';

if (!file_exists($testFile) && $throwOnMissingFile) {
throw new \Exception(sprintf('Test case %s not found', $testFile));
Expand All @@ -389,11 +389,11 @@ protected function _mapFileToCase($file, $category, $throwOnMissingFile = true)
}

if ($category === 'app') {
$testFile = str_replace(APP, APP . 'Test/TestCase/', $file) . 'Test.php';
$testFile = str_replace(APP, APP . 'tests/TestCase/', $file) . 'Test.php';
} else {
$testFile = preg_replace(
"@((?:plugins|Plugin)[\\/]{$category}[\\/])(.*)$@",
'\1Test/TestCase/\2Test.php',
'\1tests/TestCase/\2Test.php',
$file
);
}
Expand All @@ -404,7 +404,7 @@ protected function _mapFileToCase($file, $category, $throwOnMissingFile = true)

$testCase = substr($testFile, 0, -8);
$testCase = str_replace(DS, '/', $testCase);
$testCase = preg_replace('@.*Test/TestCase/@', '', $testCase);
$testCase = preg_replace('@.*tests/TestCase/@', '', $testCase);

return $testCase;
}
Expand All @@ -428,6 +428,11 @@ protected function _mapFileToCategory($file) {
if (strpos($file, APP) !== false) {
return 'app';
}
$file = preg_replace(
['#^Cake/#', '#^Test/#'],
['src/', 'tests/'],
$file
);
if (file_exists(ROOT . DS . $file) || strpos($file, ROOT . DS) !== false) {
return 'core';
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fb72c03

Please sign in to comment.