Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 291569e

Browse files
Merge pull request #8 from TiMESPLiNTER/migrate-to-php-mock-integration-v2
PHP 8.0 support - update dependencies
2 parents 12c120d + 9820ff4 commit 291569e

File tree

15 files changed

+171
-87
lines changed

15 files changed

+171
-87
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Check Coding Standards"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check Coding Standards"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2, cs2pr
22+
23+
- name: "Install dependencies"
24+
run: "composer install --no-interaction --no-progress --no-suggest"
25+
26+
- name: "Run phpcs"
27+
run: vendor/bin/phpcs -q --report=checkstyle | cs2pr

‎.github/workflows/phpmd.yml‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Check phpmd"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check phpmd"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2
22+
23+
- name: "Install dependencies"
24+
run: "composer require phpmd/phpmd --no-interaction --no-progress --no-suggest"
25+
26+
- name: "Run phpmd"
27+
run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode

‎.github/workflows/phpunit.yml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "PHPUnit tests"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
phpunit:
9+
name: PHPUnit tests on PHP ${{ matrix.php-version }}
10+
11+
runs-on: "ubuntu-latest"
12+
13+
strategy:
14+
matrix:
15+
php-version:
16+
- "7.2"
17+
- "7.3"
18+
- "7.4"
19+
- "8.0"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v2"
24+
25+
- name: "Install PHP"
26+
uses: "shivammathur/setup-php@v2"
27+
with:
28+
coverage: "pcov"
29+
php-version: "${{ matrix.php-version }}"
30+
ini-values: memory_limit=-1
31+
tools: composer:v2
32+
33+
- name: "Cache dependencies"
34+
uses: "actions/cache@v2"
35+
with:
36+
path: |
37+
~/.composer/cache
38+
vendor
39+
key: "php-${{ matrix.php-version }}"
40+
restore-keys: "php-${{ matrix.php-version }}"
41+
42+
- name: "Install dependencies"
43+
run: "composer install --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Tests"
46+
run: vendor/bin/phpunit

‎.github/workflows/test-flight.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Check test-flight"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check test-flight"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2
22+
ini-values: "zend.assertions=1"
23+
24+
- name: "Install dependencies"
25+
run: "composer require cundd/test-flight --no-interaction --no-progress --no-suggest"
26+
27+
- name: "Run test-flight"
28+
run: |
29+
vendor/bin/test-flight README.md
30+
vendor/bin/test-flight classes/

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.phpunit.result.cache
2+
/composer.lock
3+
/vendor/

‎.travis.yml‎

Lines changed: 0 additions & 59 deletions
This file was deleted.

‎README.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,3 @@ Responsable for this project is Markus Malkusch markus@malkusch.de.
6161

6262
If you like this project and feel generous donate a few Bitcoins here:
6363
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)
64-
65-
[![Build Status](https://travis-ci.org/php-mock/php-mock-prophecy.svg?branch=master)](https://travis-ci.org/php-mock/php-mock-prophecy)

‎classes/FunctionProphecy.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@
1717
*/
1818
final class FunctionProphecy implements ProphecyInterface
1919
{
20-
20+
2121
/**
2222
* @var Prophet The prophet.
2323
*/
2424
private $prophet;
25-
25+
2626
/**
2727
* @var string The namespace.
2828
*/
2929
private $namespace;
30-
30+
3131
/**
3232
* @var Revelation[] The delegated prophecies.
3333
*/
3434
private $revelations = [];
35-
35+
3636
/**
3737
* Sets the prophet.
3838
*
@@ -44,7 +44,7 @@ public function __construct($namespace, Prophet $prophet)
4444
$this->prophet = $prophet;
4545
$this->namespace = $namespace;
4646
}
47-
47+
4848
/**
4949
* Creates a new function prophecy using the specified function name
5050
* and arguments.
@@ -62,7 +62,7 @@ public function __call($functionName, array $arguments)
6262
$this->revelations[] = new Revelation($this->namespace, $functionName, $prophecy);
6363
return $prophecy->__call(MockDelegateFunctionBuilder::METHOD, $arguments);
6464
}
65-
65+
6666
/**
6767
* Reveals the function prophecies.
6868
*

‎classes/PHPProphet.php‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ final class PHPProphet
3939
* @var Prophet The prophet.
4040
*/
4141
private $prophet;
42-
42+
4343
/**
4444
* Builds the prophet.
4545
*
@@ -50,12 +50,12 @@ public function __construct(Prophet $prophet = null)
5050
if (is_null($prophet)) {
5151
$prophet = new Prophet();
5252
}
53-
53+
5454
$revealer = new ReferencePreservingRevealer(self::getProperty($prophet, "revealer"));
5555
$util = self::getProperty($prophet, "util");
5656
$this->prophet = new Prophet($prophet->getDoubler(), $revealer, $util);
5757
}
58-
58+
5959
/**
6060
* Creates a new function prophecy for a given namespace.
6161
*
@@ -67,7 +67,7 @@ public function prophesize($namespace)
6767
{
6868
return new FunctionProphecy($namespace, $this->prophet);
6969
}
70-
70+
7171
/**
7272
* Checks all predictions defined by prophecies of this Prophet.
7373
*
@@ -81,7 +81,7 @@ public function checkPredictions()
8181
Mock::disableAll();
8282
$this->prophet->checkPredictions();
8383
}
84-
84+
8585
/**
8686
* Defines the function prophecy in the given namespace.
8787
*
@@ -110,7 +110,7 @@ public static function define($namespace, $name)
110110
->build()
111111
->define();
112112
}
113-
113+
114114
/**
115115
* Returns a private property of a prophet.
116116
*

‎classes/ReferencePreservingRevealer.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
final class ReferencePreservingRevealer implements RevealerInterface
1717
{
18-
18+
1919
/**
2020
* @var RevealerInterface The subject.
2121
*/
2222
private $revealer;
23-
23+
2424
/**
2525
* Sets the subject.
2626
*

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /