com pftt2: Added HelloWorld test files and updated respective groovy file: cache/helloworld/tests/HelloWorld.php
cache/helloworld/tests/HelloWorldTest.php conf/app/hello_worl d.groovy
| From: | Christoph Michael Becker | Date: | Fri, 17 Jan 2020 13:40:18 +0000 |
| Subject: | com pftt2: Added HelloWorld test files and updated respective groovy file: cache/helloworld/tests/HelloWorld.php cache/helloworld/tests/HelloWorldTest.php conf/app/hello_worl d.groovy |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-68801@lists.php.net to get a copy of this message | ||
Commit: 246613fa84f9adc3015b82dede5e100e112bfdf6
Author: Allen Truong <v-altruo@microsoft.com> Wed, 15 Jan 2020 11:33:16 -0800
Committer: Christoph M. Becker <cmbecker69@gmx.de> Fri, 17 Jan 2020 14:40:18 +0100
Parents: bf0a98eaae97ce948eb32b922832599ddba960a8
Branches: master
Link: http://git.php.net/?p=pftt2.git;a=commitdiff;h=246613fa84f9adc3015b82dede5e100e112bfdf6
Log:
Added HelloWorld test files and updated respective groovy file
Changed paths:
A cache/helloworld/tests/HelloWorld.php
A cache/helloworld/tests/HelloWorldTest.php
M conf/app/hello_world.groovy
Diff:
diff --git a/cache/helloworld/tests/HelloWorld.php b/cache/helloworld/tests/HelloWorld.php
new file mode 100644
index 00000000..5169ea5c
--- /dev/null
+++ b/cache/helloworld/tests/HelloWorld.php
@@ -0,0 +1,2 @@
+<?
+print 'Hello world';
\ No newline at end of file
diff --git a/cache/helloworld/tests/HelloWorldTest.php b/cache/helloworld/tests/HelloWorldTest.php
new file mode 100644
index 00000000..6efee6da
--- /dev/null
+++ b/cache/helloworld/tests/HelloWorldTest.php
@@ -0,0 +1,9 @@
+<?php
+class HelloWorldTest extends PHPUnit_Framework_TestCase
+{
+ public function testExpectHelloWorldActualHelloWorld()
+ {
+ $this->expectOutputString('Hello World');
+ include 'HelloWorld.php';
+ }
+}
\ No newline at end of file
diff --git a/conf/app/hello_world.groovy b/conf/app/hello_world.groovy
index 696a1f1c..2376a465 100644
--- a/conf/app/hello_world.groovy
+++ b/conf/app/hello_world.groovy
@@ -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 {