Added HelloWorld test files and updated respective groovy file

This commit is contained in:
Allen Truong
2020-01-15 11:33:16 -08:00
committed by Christoph M. Becker
parent bf0a98eaae
commit 246613fa84
3 changed files with 13 additions and 2 deletions

2
cache/helloworld/tests/HelloWorld.php vendored Normal file
View File

@@ -0,0 +1,2 @@
<?
print 'Hello world';

View File

@@ -0,0 +1,9 @@
<?php
class HelloWorldTest extends PHPUnit_Framework_TestCase
{
public function testExpectHelloWorldActualHelloWorld()
{
$this->expectOutputString('Hello World');
include 'HelloWorld.php';
}
}

View File

@@ -16,7 +16,7 @@ class HelloWorldPhpUnitTestPack extends PhpUnitSourceTestPack {
@Override
protected String getSourceRoot(ConsoleManager cm, AHost host) {
return host.getPfttDir()+"/cache/working/helloworld";
return host.getPfttDir()+"/cache/helloworld";
}
@Override
@@ -26,7 +26,7 @@ class HelloWorldPhpUnitTestPack extends PhpUnitSourceTestPack {
@Override
public boolean isFileNameATest(String file_name) {
return file_name.endsWith(".php");
return file_name.endsWith("Test.php");
}
protected void readTestFile(final int max_read_count, String rel_test_file_name, String abs_test_file_name, PhpUnitDist php_unit_dist, List<PhpUnitTestCase> test_cases, File file) throws IOException {