-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathbootstrap.php
33 lines (27 loc) · 926 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Copyright © OXID eSales AG. All rights reserved.
* See LICENSE file for license details.
*/
require_once 'base.php';
require_once TEST_LIBRARY_PATH .'Deprecated.php';
// NOTE: Presence of the correct UNC classes needs to be ensured before any shop classes can be used.
\OxidEsales\TestingLibrary\TestConfig::prepareUnifiedNamespaceClasses();
define('OXID_PHP_UNIT', true);
$sTestFilePath = strtolower(implode(",", $_SERVER['argv']));
$sTestType = 'unit';
foreach (array('acceptance', 'selenium', 'javascript') as $search) {
if (strpos($sTestFilePath, $search) !== false) {
$sTestType = 'acceptance';
break;
}
}
switch($sTestType) {
case 'acceptance':
$bootstrap = new OxidEsales\TestingLibrary\Bootstrap\SeleniumBootstrap();
break;
default:
$bootstrap = new OxidEsales\TestingLibrary\Bootstrap\UnitBootstrap();
break;
}
$bootstrap->init();