Skip to content

Commit 582f9f9

Browse files
authored
Merge pull request #881 from xPaw/merge-1.8.x
Merge `1.8.x-beta` into `master`
2 parents e76c4e4 + cfb313f commit 582f9f9

File tree

8 files changed

+53
-36
lines changed

8 files changed

+53
-36
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
- push
3+
- pull_request
4+
5+
jobs:
6+
phpunit:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
php:
12+
- '7.1'
13+
- '7.2'
14+
- '7.3'
15+
- '7.4'
16+
- '8.0'
17+
- '8.1'
18+
- '8.2'
19+
- '8.3'
20+
- '8.4'
21+
22+
steps:
23+
- name: Checkout the source code
24+
uses: actions/checkout@v4
25+
26+
- name: Set up PHP
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: '${{ matrix.php }}'
30+
31+
- name: Install dependencies
32+
run: composer install
33+
34+
- name: Run tests
35+
run: |
36+
vendor/bin/phpunit
37+
vendor/bin/phpunit test/CommonMarkTestWeak.php || true

.gitignore

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

.travis.yml

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

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.3.0",
16+
"php": ">=7.1",
1717
"ext-mbstring": "*"
1818
},
1919
"require-dev": {
20-
"phpunit/phpunit": "^4.8.35"
20+
"phpunit/phpunit": "^7.5|^8.5|^9.6"
2121
},
2222
"autoload": {
2323
"psr-0": {"Parsedown": ""}

test/CommonMarkTestStrict.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<?php
22

3+
use PHPUnit\Framework\TestCase;
4+
35
/**
46
* Test Parsedown against the CommonMark spec
57
*
68
* @link http://commonmark.org/ CommonMark
79
*/
8-
class CommonMarkTestStrict extends PHPUnit_Framework_TestCase
10+
class CommonMarkTestStrict extends TestCase
911
{
1012
const SPEC_URL = 'https://raw.githubusercontent.com/jgm/CommonMark/master/spec.txt';
1113

1214
protected $parsedown;
1315

14-
protected function setUp()
16+
protected function setUp() : void
1517
{
1618
$this->parsedown = new TestParsedown();
1719
$this->parsedown->setUrlsLinked(false);

test/CommonMarkTestWeak.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CommonMarkTestWeak extends CommonMarkTestStrict
1717
{
1818
protected $textLevelElementRegex;
1919

20-
protected function setUp()
20+
protected function setUp() : void
2121
{
2222
parent::setUp();
2323

test/data/fenced_code_block.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
<pre><code>foo
1616

1717

18-
bar</code></pre>
18+
bar</code></pre>
19+
<pre><code class="language-php">&lt;?php
20+
echo "Hello World";</code></pre>

test/data/fenced_code_block.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@ foo
3535
3636
3737
bar
38+
```
39+
40+
```php some-class
41+
<?php
42+
echo "Hello World";
3843
```

0 commit comments

Comments
 (0)