-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpselenium
More file actions
executable file
·27 lines (19 loc) · 918 Bytes
/
wpselenium
File metadata and controls
executable file
·27 lines (19 loc) · 918 Bytes
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
#!/usr/bin/env php
<?php
include_once sprintf("%s%s%s%s%s", getcwd(), DIRECTORY_SEPARATOR, "vendor", DIRECTORY_SEPARATOR, "autoload.php");
use WPSelenium\WPSeleniumConfig;
use WPSelenium\Utilities\Logger;
use WPSelenium\Provision\ProvisionTestPlugin;
use WPSelenium\Provision\ProvisionSelenium;
use WPSelenium\TestRunner;
echo "--- WPSelenium Tests Runner --- \n";
$wpseleniumConfigFile = sprintf("%s%s%s", getcwd(), DIRECTORY_SEPARATOR, "wpselenium.xml");
if (!file_exists($wpseleniumConfigFile)){
Logger::ERROR(sprintf("wpselenium.xml config not found. Please ensure that the file existes in the root of your project. Looking in %s", getcwd()), true);
}
$wpSeleniumConfig = new WPSeleniumConfig($wpseleniumConfigFile, __DIR__);
ProvisionSelenium::Provision();
foreach ($wpSeleniumConfig->GetHelper()->GetProvisionClasses() as $provisionClass){
$provisionClass::Provision();
}
TestRunner::RunTests();