| @@ 7-25 (lines=19) @@ | ||
| 4 | ||
| 5 | use hipanel\tests\_support\Page\Login; |
|
| 6 | ||
| 7 | class Client extends \AcceptanceTester |
|
| 8 | { |
|
| 9 | public $username = ''; |
|
| 10 | public $password = ''; |
|
| 11 | ||
| 12 | public function login() |
|
| 13 | { |
|
| 14 | if ($this->loadSessionSnapshot('login-client')) { |
|
| 15 | return $this; |
|
| 16 | } |
|
| 17 | ||
| 18 | $hiam = new Login($this); |
|
| 19 | $hiam->login($this->username, $this->password); |
|
| 20 | ||
| 21 | $this->saveSessionSnapshot('login-client'); |
|
| 22 | ||
| 23 | return $this; |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||
| @@ 12-27 (lines=16) @@ | ||
| 9 | * |
|
| 10 | * @author Dmytro Naumenko <[email protected]> |
|
| 11 | */ |
|
| 12 | class Seller extends Client |
|
| 13 | { |
|
| 14 | public function login() |
|
| 15 | { |
|
| 16 | if ($this->loadSessionSnapshot('login-seller')) { |
|
| 17 | return $this; |
|
| 18 | } |
|
| 19 | ||
| 20 | $hiam = new Login($this); |
|
| 21 | $hiam->login($this->username, $this->password); |
|
| 22 | ||
| 23 | $this->saveSessionSnapshot('login-seller'); |
|
| 24 | ||
| 25 | return $this; |
|
| 26 | } |
|
| 27 | } |
|
| 28 | ||