Skip to content

Commit ff9ecc0

Browse files
committed
upgrade to phpunit 8
1 parent 0301a34 commit ff9ecc0

22 files changed

+44
-21
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ git submodule init
1515
git submodule update
1616
composer install
1717
build/runphp build/gen_test.php
18-
phpunit
18+
build/test
1919
```

build/gen_test.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ function genTestForClass($classname) {
2828
use LightnCandy\\LightnCandy;
2929
use LightnCandy\\Runtime;
3030
use LightnCandy\\SafeString;
31+
use PHPUnit\\Framework\\TestCase;
3132
3233
require_once(__DIR__ . '/test_util.php');
3334
34-
class {$classname}Test extends PHPUnit_Framework_TestCase
35+
class {$classname}Test extends TestCase
3536
{
3637
3738
VAR

build/test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
vendor/bin/phpunit --bootstrap vendor/autoload.php

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"php": ">=5.4.0"
1515
},
1616
"require-dev": {
17-
"phpunit/phpunit": "4.8.35"
17+
"phpunit/phpunit": "8.0.6"
1818
},
1919
"autoload": {
2020
"psr-4": {

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</filter>
1313

1414
<logging>
15-
<log type="coverage-html" target="build/result/coverage" title="lightncandy" charset="UTF-8" />
15+
<log type="coverage-html" target="build/result/coverage" />
1616
<log type="coverage-text" target="php://stdout" />
1717
</logging>
1818

tests/CompilerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
use LightnCandy\LightnCandy;
66
use LightnCandy\Runtime;
77
use LightnCandy\SafeString;
8+
use PHPUnit\Framework\TestCase;
89

910
require_once(__DIR__ . '/test_util.php');
1011

11-
class CompilerTest extends PHPUnit_Framework_TestCase
12+
class CompilerTest extends TestCase
1213
{
1314
/**
1415
* @covers LightnCandy\Compiler::getFuncName

tests/ContextTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
use LightnCandy\LightnCandy;
66
use LightnCandy\Runtime;
77
use LightnCandy\SafeString;
8+
use PHPUnit\Framework\TestCase;
89

910
require_once(__DIR__ . '/test_util.php');
1011

11-
class ContextTest extends PHPUnit_Framework_TestCase
12+
class ContextTest extends TestCase
1213
{
1314
/**
1415
* @covers LightnCandy\Context::updateHelperTable

tests/EncoderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
use LightnCandy\LightnCandy;
66
use LightnCandy\Runtime;
77
use LightnCandy\SafeString;
8+
use PHPUnit\Framework\TestCase;
89

910
require_once(__DIR__ . '/test_util.php');
1011

11-
class EncoderTest extends PHPUnit_Framework_TestCase
12+
class EncoderTest extends TestCase
1213
{
1314
/**
1415
* @covers LightnCandy\Encoder::raw

tests/ExporterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
use LightnCandy\LightnCandy;
66
use LightnCandy\Runtime;
77
use LightnCandy\SafeString;
8+
use PHPUnit\Framework\TestCase;
89

910
require_once(__DIR__ . '/test_util.php');
1011

11-
class ExporterTest extends PHPUnit_Framework_TestCase
12+
class ExporterTest extends TestCase
1213
{
1314
/**
1415
* @covers LightnCandy\Exporter::closure

tests/ExpressionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
use LightnCandy\LightnCandy;
66
use LightnCandy\Runtime;
77
use LightnCandy\SafeString;
8+
use PHPUnit\Framework\TestCase;
89

910
require_once(__DIR__ . '/test_util.php');
1011

11-
class ExpressionTest extends PHPUnit_Framework_TestCase
12+
class ExpressionTest extends TestCase
1213
{
1314
/**
1415
* @covers LightnCandy\Expression::boolString

0 commit comments

Comments
 (0)