PHPUnit, Using class consts to change State
问题 I'm learning Zend and also PHPUnit. Here is what I have below public function changeToIllegalState() { return array( array( Application_Model_SomeModel::FAIL ), array( Application_Model_SomeModel::SUCCESS ) ); } /** * @dataProvider changeToIllegalState * @expectedException IllegalStateChangeException */ public function testIllegalStateChangeGeneratesException( $state ) { $mapper = new Application_Model_Mapper_SomeModel(); $model = new Application_Model_SomeModel(); $model->changeState( $state