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.
		
		
		
		
			
				
					51 lines
				
				928 B
			
		
		
			
		
	
	
					51 lines
				
				928 B
			| 
											12 years ago
										 | <?php
 | ||
|  | 
 | ||
|  | namespace yii\codeception;
 | ||
|  | 
 | ||
| 
											12 years ago
										 | use Codeception\AbstractGuy;
 | ||
|  | 
 | ||
|  | /**
 | ||
|  |  *
 | ||
|  |  * Declare UI map for this page here. CSS or XPath allowed.
 | ||
|  |  * public static $usernameField = '#username';
 | ||
|  |  * public static $formSubmitButton = "#mainForm input[type=submit]";
 | ||
|  |  *
 | ||
|  |  * @author Mark Jebri <mark.github@yandex.ru>
 | ||
|  |  * @since 2.0
 | ||
|  |  */
 | ||
|  | abstract class BasePage
 | ||
| 
											12 years ago
										 | {
 | ||
| 
											12 years ago
										 | 	/**
 | ||
|  | 	 * @var string include url of current page. This property has to be overwritten by subclasses
 | ||
|  | 	 */
 | ||
| 
											12 years ago
										 | 	public static $URL = '';
 | ||
|  | 	/**
 | ||
| 
											12 years ago
										 | 	 * @var AbstractGuy
 | ||
| 
											12 years ago
										 | 	 */
 | ||
| 
											12 years ago
										 | 	protected $guy;
 | ||
|  | 
 | ||
|  | 	public function __construct($I)
 | ||
|  | 	{
 | ||
|  | 		$this->guy = $I;
 | ||
|  | 	}
 | ||
| 
											12 years ago
										 | 
 | ||
|  | 	/**
 | ||
|  | 	 * 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;
 | ||
|  | 	}
 | ||
|  | 
 | ||
|  | 	/**
 | ||
| 
											12 years ago
										 | 	 * @param $I
 | ||
|  | 	 * @return static
 | ||
| 
											12 years ago
										 | 	 */
 | ||
|  | 	public static function of($I)
 | ||
|  | 	{
 | ||
|  | 		return new static($I);
 | ||
|  | 	}
 | ||
|  | }
 |