Skip to content

Commit 90ea7e7

Browse files
committed
Fixed broken tests
1 parent 9cbe12a commit 90ea7e7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
"symfony/browser-kit": ">=2.7 <5.0",
2424
"symfony/dom-crawler": ">=2.7 <5.0"
2525
},
26+
"require-dev": {
27+
"codeception/util-universalframework": "dev-master"
28+
},
2629
"autoload":{
2730
"classmap": ["src/"]
2831
},

tests/data/app/index.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
22
if (!headers_sent()) header('Content-Type: text/html; charset=UTF-8');
3-
require_once __DIR__.'/../../../autoload.php';
4-
5-
if (file_exists(__DIR__ . '/../sandbox/c3.php')) {
6-
require __DIR__ . '/../sandbox/c3.php';
7-
} else {
8-
require __DIR__ . '/../claypit/c3.php';
9-
}
103

114
require_once('glue.php');
125
require_once('data.php');

tests/unit/Codeception/Module/FrameworksTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ class FrameworksTest extends TestsForWeb
1515

1616
public function _setUp()
1717
{
18-
$this->module = new \Codeception\Module\UniversalFramework(make_container());
18+
$container = \Codeception\Util\Stub::make('Codeception\Lib\ModuleContainer');
19+
$this->module = new \Codeception\Module\UniversalFramework($container);
20+
$this->module->_initialize();
1921
}
2022

2123
public function testHttpAuth()
@@ -83,11 +85,13 @@ public function testMoveBackThrowsExceptionIfNumberOfStepsIsInvalid()
8385

8486
public function testCreateSnapshotOnFail()
8587
{
86-
$module = Stub::construct(get_class($this->module), [make_container()], [
88+
$container = \Codeception\Util\Stub::make('Codeception\Lib\ModuleContainer');
89+
$module = Stub::construct(get_class($this->module), [$container], [
8790
'_savePageSource' => \Codeception\Stub\Expected::once(function ($filename) {
8891
$this->assertEquals(codecept_log_dir('Codeception.Module.UniversalFramework.looks.like..test.fail.html'), $filename);
8992
}),
9093
]);
94+
$module->_initialize();
9195
$module->amOnPage('/');
9296
$cest = new \Codeception\Test\Cest($this->module, 'looks:like::test', 'demo1Cest.php');
9397
$module->_failed($cest, new \PHPUnit\Framework\AssertionFailedError());

0 commit comments

Comments
 (0)