File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 141141
142142 describe ('__invoke() ' , function () {
143143
144+ it ('returns Mezzio Middleware instance without TemplateRendererInterface instance ' , function () {
145+
146+ $ container = new ServiceManager ();
147+ $ container ->setService ('config ' , $ this ->config );
148+
149+ $ logging = Double::instance (['extends ' => Logging::class, 'methods ' => '__construct ' ]);
150+ $ container ->setService (Logging::class, $ logging );
151+
152+ $ actual = $ this ->factory ($ container );
153+ expect ($ actual )->toBeAnInstanceOf (Mezzio::class);
154+
155+ });
156+
144157 it ('returns Mezzio Middleware instance with doctrine to laminas-db conversion ' , function () {
145158
146159 $ config = $ this ->config ;
147160 unset($ config ['db ' ]);
148161 $ container = new ServiceManager ();
149162 $ container ->setService ('config ' , $ config );
150163
151- allow ($ container )->toReceive ('has ' )->with (EntityManager::class)->andReturn (true );
152164 $ entityManager = Double::instance (['extends ' => EntityManager::class, 'methods ' => '__construct ' ]);
153- $ connection = Double:: instance ([ ' extends ' => Connection ::class, ' methods ' => ' __construct ' ] );
165+ $ container -> setService (EntityManager ::class, $ entityManager );
154166
167+ $ connection = Double::instance (['extends ' => Connection::class, 'methods ' => '__construct ' ]);
155168 $ driver = Double::instance (['extends ' => Driver::class, 'methods ' => '__construct ' ]);
156169 allow ($ driver )->toReceive ('getName ' )->andReturn ('pdo_mysql ' );
157170
You can’t perform that action at this time.
0 commit comments