Skip to content

Update codebase to PHP 7.4 #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
Loading