Skip to content

Commit 783a0b9

Browse files
committed
Move mock runner to correct location
1 parent f1ab6e1 commit 783a0b9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests;
3+
namespace ProcessMaker\ScriptRunners;
44

55
class MockRunner
66
{
@@ -9,6 +9,9 @@ public function __construct($_executor)
99
}
1010

1111
public function run($code, $data, $config, $timeout, $user) {
12+
if (app()->env !== 'testing') {
13+
throw new \Exception("MockRunner is for tests only.");
14+
}
1215
putenv('HOST_URL=' . config('app.docker_host_url'));
1316
$res = eval(str_replace('<?php', '', $code));
1417
return ['output' => $res];

0 commit comments

Comments
 (0)