Skip to content
This repository
Browse code

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...
commit a6017e6f6a6db09f4dca294a36172831dc2296d5 1 parent f0752fe
Joel Perras authored May 28, 2009
3  cake/tests/cases/libs/code_coverage_manager.test.php
@@ -116,6 +116,9 @@ function testGetTestObjectFileNameFromTestCaseFile() {
116 116
 		$expected = $manager->__testObjectFileFromCaseFile('models/some_file.test.php', true);
117 117
 		$this->assertIdentical(APP.'models'.DS.'some_file.php', $expected);
118 118
 
  119
+		$expected = $manager->__testObjectFileFromCaseFile('datasources/some_file.test.php', true);
  120
+		$this->assertIdentical(APP.'models'.DS.'datasources'.DS.'some_file.php', $expected);
  121
+
119 122
 		$expected = $manager->__testObjectFileFromCaseFile('controllers/some_file.test.php', true);
120 123
 		$this->assertIdentical(APP.'controllers'.DS.'some_file.php', $expected);
121 124
 
3  cake/tests/lib/code_coverage_manager.php
@@ -467,7 +467,8 @@ function __testObjectFileFromCaseFile($file, $isApp = true) {
467 467
 		$folderPrefixMap = array(
468 468
 			'behaviors' => 'models',
469 469
 			'components' => 'controllers',
470  
-			'helpers' => 'views'
  470
+			'helpers' => 'views',
  471
+			'datasources' => 'models'
471 472
 		);
472 473
 
473 474
 		foreach ($folderPrefixMap as $dir => $prefix) {

0 notes on commit a6017e6

Please sign in to comment.
Something went wrong with that request. Please try again.