Skip to content

Commit 59ac9a5

Browse files
committed
Port test suite to PHPUnitPolyFills
This implies to delete AllTests.php
1 parent ca1c19c commit 59ac9a5

File tree

5 files changed

+8
-40
lines changed

5 files changed

+8
-40
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
"pear/pear-core-minimal": "^1.10.1"
4848
},
4949
"require-dev": {
50-
"phpunit/phpunit": "^4"
50+
"yoast/phpunit-polyfills": "^2.0"
5151
}
5252
}

package.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ There are two classes to use for templating. HTML_Template_IT is used for basic
6060
<file name="HTML/Template/IT.php" role="php" />
6161
<file name="HTML/Template/ITX.php" role="php" />
6262
<file name="HTML/Template/IT_Error.php" role="php" />
63-
<file name="tests/AllTests.php" role="test" />
6463
<file name="tests/ITTest.php" role="test" />
6564
<file name="tests/ITXTest.php" role="test" />
6665
<file name="tests/templates/addblock.html" role="test" />

tests/AllTests.php

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

tests/ITTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
<?php
2+
3+
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
4+
25
require_once 'HTML/Template/IT.php';
36

4-
class ITTest extends PHPUnit_Framework_TestCase
7+
class ITTest extends Yoast\PHPUnitPolyfills\TestCases\TestCase
58
{
69
/**
710
* An HTML_Template_IT object
811
* @var object
912
*/
1013
var $tpl;
1114

12-
function setUp()
15+
protected function set_up()
1316
{
1417
$this->tpl = new HTML_Template_IT(dirname(__FILE__) . '/templates');
1518
}
1619

17-
function tearDown()
20+
protected function tear_down()
1821
{
1922
unset($this->tpl);
2023
}

tests/ITXTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static function _numberFormatCallback($float, $decimals)
2323

2424
class ITXTest extends ITTest
2525
{
26-
function setUp()
26+
function set_up()
2727
{
2828
$this->tpl = new HTML_Template_ITX(dirname(__FILE__) . '/templates');
2929
}

0 commit comments

Comments
 (0)