ZF-8305: Zend_Tool create controller in nonexistent module dies on fatal error

Description

When I tried to create controller in nonexistent module, it died with an error:

zf create controller users 1 nonexistent -> Fatal error: Call to a member function search() on a non-object in zf\library\Zend\Tool\Project\Provider\Controller.php on line 107

(tested on latest incubator version)

Comments

duplicated issue

I understand the issue, but I can't create a test. How can I create a test to simulate a requested Zend_Tool?

In fact Zend_Tool_Project_Provider_Controller::hasResource() with nonexistent module dies on fatal error.