-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathCallMethodTest.php
More file actions
76 lines (64 loc) Β· 2.18 KB
/
CallMethodTest.php
File metadata and controls
76 lines (64 loc) Β· 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
declare(strict_types=1);
namespace PHPJava\Tests\Cases\Compiler;
use PHPJava\Tests\Cases\Base;
class CallMethodTest extends Base
{
use JavaRunnable;
public function testCallStaticMethodsWithNonArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function TestCallStaticMethodsWithArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsWithNonArgumentsAndNamespace()
{
[$output, $return] = $this->runJavaTest(
__METHOD__,
'PHPJava.CompilerMethodCallTest'
);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsWithArgumentsAndNamespace()
{
[$output, $return] = $this->runJavaTest(
__METHOD__,
'PHPJava.CompilerMethodCallTest'
);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsWithTypeHintedArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsWithPrimitiveTypeHintedArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('1234', $output[0]);
}
public function testCallStaticMethodsMultiplePattern1()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsMultiplePattern2()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallStaticMethodsWithMultipleArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
public function testCallDynamicMethodsWithNonArguments()
{
[$output, $return] = $this->runJavaTest(__METHOD__);
$this->assertSame('Hello World!', $output[0]);
}
}