This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 11
11
12
12
class HydratorManagerFactory extends AbstractPluginManagerFactory
13
13
{
14
+ /**
15
+ * @todo Switch to Zend\Hydrator\HydratorPluginManager for 3.0 (if kept)
16
+ */
14
17
const PLUGIN_MANAGER_CLASS = 'Zend\Stdlib\Hydrator\HydratorPluginManager ' ;
15
18
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Zend Framework (http://framework.zend.com/)
4
+ *
5
+ * @link http://github.com/zendframework/zf2 for the canonical source repository
6
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7
+ * @license http://framework.zend.com/license/new-bsd New BSD License
8
+ */
9
+
10
+ namespace ZendTest \Mvc \Service ;
11
+
12
+ use PHPUnit_Framework_TestCase as TestCase ;
13
+ use Zend \Hydrator \HydratorPluginManager as ZendHydratorManager ;
14
+ use Zend \Mvc \Service \HydratorManagerFactory ;
15
+ use Zend \ServiceManager \ServiceLocatorInterface ;
16
+ use Zend \Stdlib \Hydrator \HydratorPluginManager ;
17
+
18
+ class HydratorManagerFactoryTest extends TestCase
19
+ {
20
+ public function setUp ()
21
+ {
22
+ $ this ->factory = new HydratorManagerFactory ();
23
+ $ this ->services = $ this ->prophesize (ServiceLocatorInterface::class);
24
+ $ this ->services ->get ('Config ' )->willReturn ([]);
25
+ }
26
+
27
+ public function testFactoryReturnsZendHydratorManagerInstance ()
28
+ {
29
+ $ hydrators = $ this ->factory ->createService ($ this ->services ->reveal ());
30
+ $ this ->assertInstanceOf (ZendHydratorManager::class, $ hydrators );
31
+ return $ hydrators ;
32
+ }
33
+
34
+ /**
35
+ * @todo Remove for 3.0
36
+ * @depends testFactoryReturnsZendHydratorManagerInstance
37
+ */
38
+ public function testFactoryReturnsStdlibHydratorManagerInstance ($ hydrators )
39
+ {
40
+ $ this ->assertInstanceOf (HydratorPluginManager::class, $ hydrators );
41
+ }
42
+ }
You can’t perform that action at this time.
0 commit comments