Definition at line 30 of file LazyProvideTest.php.
◆ methods()
static ILIAS\LegalDocuments\test\LazyProvideTest::methods |
( |
| ) |
|
|
static |
Definition at line 56 of file LazyProvideTest.php.
56 : array
57 {
58 return [
59 ['withdrawal'],
60 ['publicPage'],
61 ['document'],
62 ['history'],
63 ['allowEditing'],
64 ['publicApi'],
65 ['id', ''],
66 ];
67 }
◆ testConstruct()
ILIAS\LegalDocuments\test\LazyProvideTest::testConstruct |
( |
| ) |
|
Definition at line 34 of file LazyProvideTest.php.
34 : void
35 {
36 $this->assertInstanceOf(LazyProvide::class, new LazyProvide($this->fail(...)));
37 }
◆ testMethods()
ILIAS\LegalDocuments\test\LazyProvideTest::testMethods |
( |
string |
$method, |
|
|
|
$return = [] |
|
) |
| |
Definition at line 40 of file LazyProvideTest.php.
40 : void
41 {
42 $called = false;
43 $provide = $this->mockTree(Provide::class, [$method => $return]);
44
45 $create = function () use (&$called, $provide) {
46 $called = true;
47 return $provide;
48 };
49
50 $instance = new LazyProvide($create);
51 $this->assertFalse($called);
52 $this->assertSame($provide->$method(), $instance->$method());
53 $this->assertTrue($called);
54 }
The documentation for this class was generated from the following file: