for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Redaxscript\Tests;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use PHPUnitProviderAutoloader;
use Redaxscript\Config;
use Redaxscript\Db;
use Redaxscript\Language;
use Redaxscript\Registry;
use Redaxscript\Request;
/**
* TestCaseAbstract
*
* @since 2.2.0
* @package Redaxscript
* @category Tests
* @author Henry Ruhs
*/
abstract class TestCaseAbstract extends PHPUnitProviderAutoloader\TestCaseAbstract
{
* instance of the registry class
* @var Registry
protected $_registry;
* instance of the request class
* @var Request
protected $_request;
* instance of the language class
* @var Language
protected $_language;
* instance of the config class
* @var Config
protected $_config;
* instance of the driver class
* @var RemoteWebDriver
protected $_driver;
* namespace of the testing suite
* @var string
protected $_testNamespace = __NAMESPACE__;
* setUp
* @since 3.1.0
public function setUp()
Db::clearCache();
$options = new ChromeOptions();
$options->addArguments(
[
'start-fullscreen'
]);
$capabilities = DesiredCapabilities::chrome();
$capabilities->setCapability(ChromeOptions::CAPABILITY, $options);
$this->_registry = Registry::getInstance();
$this->_request = Request::getInstance();
$this->_language = Language::getInstance();
$this->_config = Config::getInstance();
$this->_driver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities);
$this->_driver->get('http://localhost:8000');
}
* tearDown
* @since 4.0.0
public function tearDown()
$this->_driver->quit();