2014-02-19 46 views
0

我試圖獲得工作的NetBeans代碼覆蓋率,但我被困在錯誤PHPUnit的給我:PHPUnit的代碼覆蓋率失敗,YAML依賴

"/usr/bin/php" "/usr/bin/phpunit" "--colors" "--log-junit" "/tmp/nb-phpunit-log.xml" "--bootstrap" "/home/btekielski/Dokumenty/Projects/PlanQ/src/tests/bootstrap.php" "--coverage-clover" "/tmp/nb-phpunit-coverage.xml" "/usr/local/netbeans-7.4/php/phpunit/NetBeansSuite.php" "--run=/home/btekielski/Dokumenty/Projects/PlanQ/src/tests" 
PHPUnit 3.7.28 by Sebastian Bergmann. 

PHP Fatal error: Uncaught exception 'PHPUnit_Framework_Error_Warning' with message 'include_once(Symfony/Component/Yaml/Yaml.class.php): failed to open stream: No such file or directory' in /home/user/Projects/src/tests/bootstrap.php:65 
Stack trace: 

我有一個自定義的自動加載功能在引導它看起來像以下:

function loadClass($class) { 
    if (empty($class) || $class == 'parent') { 
     return; 
    } 
    $throw = false; 

    if (strpos($class, 'PHPExcel') !== false) { 
     return; 
    } 

    $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . CLASS_FILE_EXTENSION; 
    include_once($file); 

    if (!class_exists($class, false) && !interface_exists($class, false)) { 
     if ($throw) { 
      trigger_error(
        "Class file '" . $file . "' do not provide class '" . 
        $class . "'", E_USER_ERROR 
      ); 
     } 

     return; 
    } 
} 

我會很感激任何提示...

+0

您的PHPUnit是否通過NetBeans中的引導程序或配置使用加載程序? –

+0

通過bootstrap.php。 –

+1

您調用的include_once()具有Symphony的相對路徑,表明它位於當前目錄下。是這種情況,還是你在這個相對路徑工作的錯誤目錄? –

回答

1

的include_once()的你叫有交響樂相對路徑,表明它是低於當前目錄。是這種情況,還是你在這個相對路徑工作的錯誤目錄?