Add 'include' & 'require' statements test.
The build was successful. 詳細

このコミットが含まれているのは:
Rafal Kupiec 2019-12-10 19:21:27 +01:00
コミット 0e757111a3
署名者: belliash
GPGキーID: 4E829243E0CFE6B4
5個のファイルの変更29行の追加0行の削除

8
tests/data/includes/base_class.aer ノーマルファイル
ファイルの表示

@ -0,0 +1,8 @@
class BaseClass {
protected void run() {
printf('Test launched...');
include 'data/includes/include_test.aer';
}
}

1
tests/data/includes/include_test.aer ノーマルファイル
ファイルの表示

@ -0,0 +1 @@
printf("OK!\n");

3
tests/data/includes/test_class.aer ノーマルファイル
ファイルの表示

@ -0,0 +1,3 @@
class Test {
string $test = 'This is a test';
}

12
tests/include_statements.aer ノーマルファイル
ファイルの表示

@ -0,0 +1,12 @@
require 'data/includes/base_class.aer';
class Program extends BaseClass {
void main() {
$this->run();
require 'data/includes/test_class.aer';
object $test = new Test();
var_dump($test);
}
}

5
tests/include_statements.exp ノーマルファイル
ファイルの表示

@ -0,0 +1,5 @@
Test launched...OK!
object(Test) {
['test'] =>
string(14 'This is a test')
}