Skip to content

Commit bbe55f7

Browse files
committed
Tests: use config of Universal module
1 parent 3122a73 commit bbe55f7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/unit/Codeception/Module/RestTest.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
22

3+
use Codeception\Module\UniversalFramework;
34
use Codeception\Test\Unit;
45
use Codeception\Util\Stub;
56

@@ -16,12 +17,10 @@ class RestTest extends Unit
1617

1718
public function _setUp()
1819
{
19-
$connector = new \Codeception\Lib\Connector\Universal();
20-
$connector->setIndex(\Codeception\Configuration::dataDir() . '/rest/index.php');
20+
$index = \Codeception\Configuration::dataDir() . '/rest/index.php';
2121

2222
$container = \Codeception\Util\Stub::make('Codeception\Lib\ModuleContainer');
23-
$connectionModule = new \Codeception\Module\UniversalFramework($container);
24-
$connectionModule->client = $connector;
23+
$connectionModule = new UniversalFramework($container, ['index' => $index]);
2524
$connectionModule->_initialize();
2625
$this->module = Stub::make('\Codeception\Module\REST');
2726
$this->module->_inject($connectionModule);
@@ -453,7 +452,7 @@ public function testAmDigestAuthenticatedThrowsExceptionWithFunctionalModules()
453452
public function testRestExecute($configUrl, $requestUrl, $expectedFullUrl)
454453
{
455454
$connectionModule = $this->createMock(
456-
\Codeception\Module\UniversalFramework::class
455+
UniversalFramework::class
457456
);
458457
$connectionModule
459458
->expects($this->once())

0 commit comments

Comments
 (0)