Davout wrote:
>
> When I run phpunit in the tests directory I get
> Fatal error: Class 'Zend_Application_Bootstrap_Bootstrap' not found in
> C:\code\myApp\application\Bootstrap.php on line 3
>
>
Ok I got past that problem, but now Running MAMP/bin/php5/bin/phpunit
--configuration phpunit.xml --verbose doesn't produce any output.
I have application/modules/order/models/OrderRepository.php
<?php
class Order_Model_OrderRepository {
...
}
-------------------------------------
I have tests/ModelTestCase.php
<?php
require_once 'Zend/Application.php';
abstract class ModelTestCase extends PHPUnit_Framework_TestCase
{
public $application;
public function setUp()
{
$this->application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}
public function appBootstrap()
{
$this->application->bootstrap();
}
}
----------------------------
I have tests/application/modules/order/models/OrderRepository.php
<?php
class Order_Model_OrderRepositoryTest extends ModelTestCase {
protected function setUp(){
parent::setUp();
}
public function testFind() {
$orderRepos = new Order_Model_OrderRepository();
$this->assertEquals(1, 2); // should produce failure!
}
}
Any ideas?
Thanks.
--
View this message in context:
http://n4.nabble.com/Bootstrapping-modules-and-testing-tp680333p758618.html
Sent from the Zend Framework mailing list archive at Nabble.com.