You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
729 B
46 lines
729 B
11 years ago
|
<?php
|
||
|
|
||
|
namespace tests\_pages;
|
||
|
|
||
|
class BasePage
|
||
|
{
|
||
|
|
||
|
// include url of current page
|
||
|
public static $URL = '';
|
||
|
|
||
|
/**
|
||
|
* Declare UI map for this page here. CSS or XPath allowed.
|
||
|
* public static $usernameField = '#username';
|
||
|
* public static $formSubmitButton = "#mainForm input[type=submit]";
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* Basic route example for your current URL
|
||
|
* You can append any additional parameter to URL
|
||
|
* and use it in tests like: EditPage::route('/123-post');
|
||
|
*/
|
||
|
public static function route($param)
|
||
|
{
|
||
|
return static::$URL.$param;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @var
|
||
|
*/
|
||
|
protected $guy;
|
||
|
|
||
|
public function __construct($I)
|
||
|
{
|
||
|
$this->guy = $I;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return $this
|
||
|
*/
|
||
|
public static function of($I)
|
||
|
{
|
||
|
return new static($I);
|
||
|
}
|
||
|
|
||
|
}
|