Im doing unit-testing with sf1.4, and want to test my model.
class TestIt extends Doctrine_Table
{
/**
* Returns an instance of this class.
*
* @return object TaskGroupTable
*/
public static function getInstance()
{
return Doctrine_Core::getTable('MyTable');
}
/**
* @return
*/
public function testMe()
{
}
}
so I create my $mock:
$mock = $this->getMock(get_class(TestIt::getInstance()));
$mock->expects
and now I want to inject this stub. How to?
Aucun commentaire:
Enregistrer un commentaire