php - Phpunit skeleton generator cannot find extends class -


i have application based on zend framework trying use phpunit generate skeletons test cases. phpunit can't seem find parent classes of classes trying generate for:

phpunit --skeleton-test default_model_person ../application/models/person.php  phpunit 3.5.11 sebastian bergmann.  php fatal error:  class 'x1_db_table_auditable' not found in /path/to/application/models/person.php on line 3  fatal error: class 'x1_db_table_auditable' not found in /path/to/application/models/person.php on line 3 

so have example application/models/person.php

 <?php  class default_model_person extends x1_db_table_auditable {        

in library/x1/db/table/auditable.php is

<?php  class x1_db_table_auditable extends x1_db_table {  ... 

i have other test cases written hand phpunit can run on application without problem. have tried specifying bootstrap file --bootstrap , config --configuration make sure path library should found, can't seem work (the result same above). how can library class found phpunit generate skeleton?

i new php, phpunit , zend, please forgive beginner questions ;) in advance!

you need set autoloader allow php import x1 , other classes when referenced, typically in bootstrap.php.

require_once 'zend/loader/autoloader.php'; $autoloader = zend_loader_autoloader::getinstance(); $autoloader->registernamespace('x1_'); 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -