Skip to content

Commit

Permalink
Port test suite to PHPUnitPolyFills
Browse files Browse the repository at this point in the history
This implies to delete AllTests.php
  • Loading branch information
duboism committed Sep 13, 2024
1 parent e95446d commit d6dd558
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 40 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"pear/pear-core-minimal": "^1.10.1"
},
"require-dev": {
"phpunit/phpunit": "^4"
"yoast/phpunit-polyfills": "^2.0"
}
}
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ There are two classes to use for templating. HTML_Template_IT is used for basic
<file name="HTML/Template/IT.php" role="php" />
<file name="HTML/Template/ITX.php" role="php" />
<file name="HTML/Template/IT_Error.php" role="php" />
<file name="tests/AllTests.php" role="test" />
<file name="tests/ITTest.php" role="test" />
<file name="tests/ITXTest.php" role="test" />
<file name="tests/templates/addblock.html" role="test" />
Expand Down
34 changes: 0 additions & 34 deletions tests/AllTests.php

This file was deleted.

9 changes: 6 additions & 3 deletions tests/ITTest.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?php

use Yoast\PHPUnitPolyfills\TestCases\TestCase;

require_once 'HTML/Template/IT.php';

class ITTest extends PHPUnit_Framework_TestCase
class ITTest extends Yoast\PHPUnitPolyfills\TestCases\TestCase
{
/**
* An HTML_Template_IT object
* @var object
*/
var $tpl;

function setUp()
protected function set_up()
{
$this->tpl = new HTML_Template_IT(dirname(__FILE__) . '/templates');
}

function tearDown()
protected function tear_down()
{
unset($this->tpl);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ITXTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static function _numberFormatCallback($float, $decimals)

class ITXTest extends ITTest
{
function setUp()
function set_up()
{
$this->tpl = new HTML_Template_ITX(dirname(__FILE__) . '/templates');
}
Expand Down

0 comments on commit d6dd558

Please sign in to comment.