Ben arı bu test çalıştırmak için almak için çalışıyorum var
require_once 'PHPUnit/Framework.php';
require_once('../config/config.php');
require_once('../classes/division.class.php');
class DivisionTest extends PHPUnit_Framework_TestCase
{
public function Divisiontest()
{
$division = new division();
try{
$division->createDivisionDetails();
}catch (CustomException $e) {
return;
}
$this->fail('An expected exception has not been raised.');
}
}
Bu Komutanlığı
phpunit - Yapılandırma = phpunit.xml division.test.php
ama hata mesajı geting tutmak
PHP Notice: Undefined index: HTTP_HOST in /home/workspace/people_scope/config/config.php on line 13
Notice: Undefined index: HTTP_HOST in /home/workspace/people_scope/config/config.php on line 13
PHP Notice: Undefined index: HTTP_HOST in /home/workspace/people_scope/config/config.php on line 26
Notice: Undefined index: HTTP_HOST in /home/workspace/people_scope/config/config.php on line 26
PHP Warning: require_once(/people_scope/config/standard.inc.php): failed to open stream: No such file or directory in /home/workspace/people_scope/config/config.php on line 46
Warning: require_once(/people_scope/config/standard.inc.php): failed to open stream: No such file or directory in /home/workspace/people_scope/config/config.php on line 46
PHP Fatal error: require_once(): Failed opening required '/people_scope/config/standard.inc.php' (include_path='/usr/bin:.:/usr/share/php:/usr/share/pear:/people_scope/assets/PEAR/:/people_scope/classes/base/') in /home/workspace/people_scope/config/config.php on line 46
Fatal error: require_once(): Failed opening required '/people_scope/config/standard.inc.php' (include_path='/usr/bin:.:/usr/share/php:/usr/share/pear:/people_scope/assets/PEAR/:/people_scope/classes/base/') in /home/workspace/people_scope/config/config.php on line 46
Ben $ _SERVER ['HTTP_HOST'] ayarlamak için denemek için bir phpunit.xml kullanarak ama hiç çalışmıyor gibi görünüyor am
<?xml version="1.0" encoding="utf-8" ?>
<phpunit>
<php>
<server name="HTTP_HOST" value="DEV"/>
</php>
</phpunit>
Ben okudum herşey bu çalışması gerektiğini söylüyorlar görünüyor