Skip to content

Commit

Permalink
Merge pull request #9 from peter279k/test_enhancement
Browse files Browse the repository at this point in the history
Test enhancement
  • Loading branch information
adhocore authored Jul 17, 2018
2 parents 1903710 + acfdd14 commit 1572d25
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2

install:
- composer install --prefer-dist
Expand Down
13 changes: 10 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
}
],
"require": {
"php": ">=5.3.0"
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^4.8 || ^5.7 || ^6.5"
},
"autoload": {
"psr-4": { "Ahc\\": "src/" }
"psr-4": {
"Ahc\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Ahc\\Test\\": "tests/src/"
}
},
"extra": {
"branch-alias": { "dev-master": "1.0-dev" }
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
9 changes: 6 additions & 3 deletions tests/src/HtmlUpTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php

namespace Ahc\HtmlUp\Test;

use Ahc\HtmlUp;
use PHPUnit\Framework\TestCase;

class HtmlUpTest extends PHPUnit_Framework_TestCase
class HtmlUpTest extends TestCase
{
/**
* @dataProvider dataSrc
Expand Down Expand Up @@ -94,7 +97,7 @@ public function dataSrc()
],
[
'Code with indent',
" <?php phpinfo();",
' <?php phpinfo();',
'<pre><code>&lt;?php phpinfo();</code></pre>',
],
[
Expand Down Expand Up @@ -153,7 +156,7 @@ public function dataSrc()
],
[
'URLs',
"[label](https://link) <http://anotherlink> <mail@localhost>",
'[label](https://link) <http://anotherlink> <mail@localhost>',
'<p><a href="https://link">label</a>' .
' <a href="http://anotherlink">http://anotherlink</a>' .
' <a href="mailto:mail@localhost">mail@localhost</a></p>',
Expand Down

0 comments on commit 1572d25

Please sign in to comment.