Skip to content

Commit

Permalink
Update codebase to PHP 7.4 (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
TavoNiievez committed Nov 30, 2021
1 parent 4ed6ad5 commit 085c554
Show file tree
Hide file tree
Showing 11 changed files with 555 additions and 533 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name":"codeception/module-webdriver",
"description":"WebDriver module for Codeception",
"keywords":["codeception", "browser-testing", "acceptance-testing"],
"homepage":"http://codeception.com/",
"homepage":"https://codeception.com/",
"type":"library",
"license":"MIT",
"authors":[
Expand All @@ -19,7 +19,9 @@
"minimum-stability": "RC",

"require": {
"php": ">=5.6.0 <9.0",
"php": "^7.4 | ^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"codeception/codeception": "^4.0",
"php-webdriver/webdriver": "^1.8.0"
},
Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# WebDriver module for Codeception
# Codeception Module WebDriver

A WebDriver module for Codeception.

[![Chrome Tests](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome.yml)
[![Chrome Headless Tests](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome-headless.yml/badge.svg)](https://github.com/Codeception/module-webdriver/actions/workflows/webdriver-chrome-headless.yml)
Expand All @@ -7,7 +9,7 @@
## Installation

```
composer require --dev "codeception/module-webdriver"
composer require "codeception/module-webdriver" --dev
```

## Documentation
Expand Down
7 changes: 6 additions & 1 deletion src/Codeception/Exception/ConnectionException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?php

declare(strict_types=1);

namespace Codeception\Exception;

class ConnectionException extends \RuntimeException
use RuntimeException;

class ConnectionException extends RuntimeException
{
}
4 changes: 2 additions & 2 deletions src/Codeception/Lib/Interfaces/ScreenshotSaver.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Codeception\Lib\Interfaces;

interface ScreenshotSaver
Expand All @@ -10,7 +11,6 @@ interface ScreenshotSaver
* $this->getModule('{{MODULE_NAME}}')->_saveScreenshot(codecept_output_dir().'screenshot_1.png');
* ```
* @api
* @param $filename
*/
public function _saveScreenshot($filename);
public function _saveScreenshot(string $filename);
}
11 changes: 4 additions & 7 deletions src/Codeception/Lib/Interfaces/SessionSnapshot.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace Codeception\Lib\Interfaces;

interface SessionSnapshot
Expand Down Expand Up @@ -27,32 +28,28 @@ interface SessionSnapshot
* // saving snapshot
* $I->saveSessionSnapshot('login');
* }
* ?>
* ```
*
* @param $name
* @return mixed
*/
public function saveSessionSnapshot($name);
public function saveSessionSnapshot(string $name);

/**
* Loads cookies from a saved snapshot.
* Allows to reuse same session across tests without additional login.
*
* See [saveSessionSnapshot](#saveSessionSnapshot)
*
* @param $name
* @return mixed
*/
public function loadSessionSnapshot($name);
public function loadSessionSnapshot(string $name);

/**
* Deletes session snapshot.
*
* See [saveSessionSnapshot](#saveSessionSnapshot)
*
* @param $name
* @return mixed
*/
public function deleteSessionSnapshot($name);
public function deleteSessionSnapshot(string $name);
}

0 comments on commit 085c554

Please sign in to comment.