File tree Expand file tree Collapse file tree
test/Unit/Porter/Connector Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,4 +29,14 @@ public function fetch($source)
2929 {
3030 return $ this ->connector ->fetch ($ this ->context , $ source );
3131 }
32+
33+ /**
34+ * Gets the wrapped connector. Useful for resources to reconfigure connector options during this import.
35+ *
36+ * @return Connector
37+ */
38+ public function getWrappedConnector ()
39+ {
40+ return $ this ->connector ;
41+ }
3242}
Original file line number Diff line number Diff line change @@ -76,4 +76,17 @@ public function testFetchCacheEnabledButNotAvailable()
7676 FixtureFactory::buildConnectionContext (true )
7777 );
7878 }
79+
80+ /**
81+ * Tests that getting the wrapped connector returns exactly the same connector as constructed with.
82+ */
83+ public function testGetWrappedConnector ()
84+ {
85+ $ connector = new ImportConnector (
86+ $ wrappedConnector = \Mockery::mock (Connector::class),
87+ FixtureFactory::buildConnectionContext ()
88+ );
89+
90+ self ::assertSame ($ wrappedConnector , $ connector ->getWrappedConnector ());
91+ }
7992}
You can’t perform that action at this time.
0 commit comments