Browse files

Updating code coverage manager to work with application-level datasou…

…rces.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8179 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent f0752fe commit a6017e6f6a6db09f4dca294a36172831dc2296d5 @jperras jperras committed May 28, 2009
View
3 cake/tests/cases/libs/code_coverage_manager.test.php
@@ -116,6 +116,9 @@ function testGetTestObjectFileNameFromTestCaseFile() {
$expected = $manager->__testObjectFileFromCaseFile('models/some_file.test.php', true);
$this->assertIdentical(APP.'models'.DS.'some_file.php', $expected);
+ $expected = $manager->__testObjectFileFromCaseFile('datasources/some_file.test.php', true);
+ $this->assertIdentical(APP.'models'.DS.'datasources'.DS.'some_file.php', $expected);
+
$expected = $manager->__testObjectFileFromCaseFile('controllers/some_file.test.php', true);
$this->assertIdentical(APP.'controllers'.DS.'some_file.php', $expected);
View
3 cake/tests/lib/code_coverage_manager.php
@@ -467,7 +467,8 @@ function __testObjectFileFromCaseFile($file, $isApp = true) {
$folderPrefixMap = array(
'behaviors' => 'models',
'components' => 'controllers',
- 'helpers' => 'views'
+ 'helpers' => 'views',
+ 'datasources' => 'models'
);
foreach ($folderPrefixMap as $dir => $prefix) {

0 comments on commit a6017e6

Please sign in to comment.