◆ setUp()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::setUp |
( |
| ) |
|
Definition at line 31 of file ClientIdReadObjectiveTest.php.
33 $this->o =
new class () extends ClientIdReadObjective {
34 public function _getDataDirectoryPath()
36 return $this->getDataDirectoryPath();
◆ testAchieve()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testAchieve |
( |
| ) |
|
Definition at line 64 of file ClientIdReadObjectiveTest.php.
References $path, $res, and ILIAS\Setup\Environment\RESOURCE_CLIENT_ID.
66 $env = $this->createMock(Setup\Environment::class);
68 $mock = $this->getMockBuilder(ClientIdReadObjective::class)
69 ->onlyMethods([
"getDataDirectoryPath",
"scanDirectory",
"isDirectory"])
72 $DATA_DIR =
"/foo/bar/data";
73 $SOME_DIR =
"clientid";
74 $SOME_FILE =
"some_file";
75 $SCAN_RESULT = [
".",
"..", $SOME_DIR, $SOME_FILE];
78 ->expects($this->once())
79 ->method(
"getDataDirectoryPath")
80 ->willReturn($DATA_DIR);
83 ->expects($this->once())
84 ->method(
"scanDirectory")
86 ->willReturn($SCAN_RESULT);
89 [$DATA_DIR .
"/" . $SOME_DIR,
true],
90 [$DATA_DIR .
"/" . $SOME_FILE,
false]
93 ->expects($this->exactly(2))
94 ->method(
"isDirectory")
96 function (
$path) use (&$consecutive):
bool {
97 list($expected, $return) = array_shift($consecutive);
98 $this->assertEquals($expected,
$path);
104 ->expects($this->once())
105 ->method(
"withResource")
109 $res = $mock->achieve($env);
110 $this->assertSame($env,
$res);
◆ testGetDataDirectoryPath()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testGetDataDirectoryPath |
( |
| ) |
|
Definition at line 113 of file ClientIdReadObjectiveTest.php.
115 $base = dirname(__DIR__, 5);
116 $this->assertEquals($base .
"/public/data", $this->o->_getDataDirectoryPath());
◆ testGetHash()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testGetHash |
( |
| ) |
|
◆ testGetLabel()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testGetLabel |
( |
| ) |
|
◆ testGetPreconditions()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testGetPreconditions |
( |
| ) |
|
Definition at line 56 of file ClientIdReadObjectiveTest.php.
58 $env = $this->createMock(Setup\Environment::class);
60 $pre = $this->o->getPreconditions($env);
61 $this->assertEquals([], $pre);
◆ testIsNotable()
ILIAS\Tests\Setup\Objective\ClientIdReadObjectiveTest::testIsNotable |
( |
| ) |
|
◆ $o
The documentation for this class was generated from the following file: