ServiceManager should check for a factory first (before invokables)
ServiceManager should check for a factory first (before invokables)

Currently a lot of tests expect that 'basepath', 'url', and 'doctype'
are available invokable helpers. In a working MVC app, we want to use
factories for these to inject things like the request, router, route
match, doctype setting from config, etc. However, in the tests, these
things will not be availble and they're expected to be available as
invokables by default. This allows both assumptions to be made at the
cost of an isset() per invokable instantiated. There's a chance that
'doctype' is the only one affected by this, which is something I'll look
into more later.

MadCat34/zend-servicemanager,weierophinney/zend-servicemanager,prolic/zend-servicemanager,akrabat/zend-servicemanager,matwright/zend-servicemanager