Skip to content

Commit 0298a43

Browse files
committed
Merged pull request #6
2 parents abc99fc + 8682910 commit 0298a43

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI
2+
3+
on:
4+
# Run on all pushes to master and on all pull requests.
5+
push:
6+
branches:
7+
master
8+
pull_request:
9+
# Allow manually triggering the workflow.
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
uses: "zetacomponents/.github/.github/workflows/ci.yml@master"

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"zetacomponents/template": "~1.4"
3535
},
3636
"require-dev": {
37-
"zetacomponents/unit-test": "*"
37+
"zetacomponents/unit-test": "*",
38+
"phpunit/phpunit": "^9.0"
3839
}
3940
}

phpunit.xml.dist

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
3-
<testsuites>
4-
<testsuite name="Zeta Components MvcTemplateTiein">
5-
<directory suffix="_test.php">./tests</directory>
6-
</testsuite>
7-
</testsuites>
8-
9-
<filter>
10-
<whitelist>
11-
<directory>./src</directory>
12-
</whitelist>
13-
</filter>
14-
</phpunit>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" convertDeprecationsToExceptions="true">
3+
<coverage>
4+
<include>
5+
<directory>./src</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="Zeta Components MvcTemplateTiein">
10+
<directory suffix="_test.php">./tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
</phpunit>

tests/views/template.php renamed to tests/views/template-tiein_test.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
* to you under the Apache License, Version 2.0 (the
99
* "License"); you may not use this file except in compliance
1010
* with the License. You may obtain a copy of the License at
11-
*
11+
*
1212
* http://www.apache.org/licenses/LICENSE-2.0
13-
*
13+
*
1414
* Unless required by applicable law or agreed to in writing,
1515
* software distributed under the License is distributed on an
1616
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -24,7 +24,7 @@
2424
* @package MvcTemplateTiein
2525
* @subpackage Tests
2626
*/
27-
require_once 'MvcTemplateTiein/tests/testfiles/testclasses.php';
27+
require_once __DIR__ . '/../testfiles/testclasses.php';
2828

2929
/**
3030
* Test the handler classes.
@@ -34,7 +34,7 @@
3434
*/
3535
class ezcMvcTemplateViewTest extends ezcTestCase
3636
{
37-
function setUp()
37+
function setUp() : void
3838
{
3939
$this->baseDir = dirname( __FILE__ ) . '/../testfiles/views/template/';
4040
}
@@ -106,7 +106,7 @@ public function testNonExistingFile()
106106

107107
public static function suite()
108108
{
109-
return new PHPUnit_Framework_TestSuite( "ezcMvcTemplateViewTest" );
109+
return new PHPUnit\Framework\TestSuite( "ezcMvcTemplateViewTest" );
110110
}
111111
}
112112
?>

0 commit comments

Comments
 (0)