mirror of
https://github.com/php/pftt2.git
synced 2026-03-24 01:02:11 +01:00
Added HelloWorld test files and updated respective groovy file
This commit is contained in:
committed by
Christoph M. Becker
parent
bf0a98eaae
commit
246613fa84
2
cache/helloworld/tests/HelloWorld.php
vendored
Normal file
2
cache/helloworld/tests/HelloWorld.php
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
<?
|
||||
print 'Hello world';
|
||||
9
cache/helloworld/tests/HelloWorldTest.php
vendored
Normal file
9
cache/helloworld/tests/HelloWorldTest.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
class HelloWorldTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testExpectHelloWorldActualHelloWorld()
|
||||
{
|
||||
$this->expectOutputString('Hello World');
|
||||
include 'HelloWorld.php';
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user