Ben bu deli gidiyor, ben bu bazı konuları bulduk ama bunların hiçbiri benim sorunu çözmek.
Şöyle test için benim bootstrap.php dosyası var
define("PHPUNIT", true);
require_once("/Applications/XAMPP/xamppfiles/htdocs/Common/test/public/index.php");
Phpunit tanımlanır eğer benim index.php dosyası uygulama nesne üzerinde run()
aramıyor. Bu sevk olmaktan uygulamayı durdurmak için doğru mudur?
Ben phpunit çalıştırdığınızda bu sınıf I mutlak yolu ile dosyayı dahil bile bulunamıyor - Ben homepage.php denilen bir test dosyası var, bu Zend_Test_PHPUnit_ControllerTestCase
genişleten bir sınıf içerir.
Aynı dize file_exists()
Koşu true döndürür. Benim bootstrap.php dosya ile bayrak önyükleme altında test dosyası homepage.php - Ben kullanarak phpunit çalıştırın
require_once("/Applications/XAMPP/xamppfiles/htdocs/libs_php/ZendFramework-1.10.7/library/Zend/Test/PHPUnit/ControllerTestCase.php");
class HomepageControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
{
public function appBootstrap()
{
$controller = $this->getFrontController();
$controller->registerPlugin(new Default_Controller_Plugin_Initialise());
}
public function setUp()
{
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}
public function testA()
{
$this->dispatch('/');
$this->assertController('index');
}
}
Ben olsun PHPUnit gelen çıkış sınıfı nasıl bulunamaz, aşağıda? Bir PHP hata gibi görünür, ama PHPUnit gelen bir şey yok - hiçbir satır numara var mı?
PHPUnit 3.3.2 by Sebastian Bergmann.
Class Zend_Test_PHPUnit_ControllerTestCase could not be found in /Applications/XAMPP/xamppfiles/htdocs/Common/test/tests/library/homepage.php
Bu konuda herhangi bir yardım için teşekkür ederiz!