25 $this->message =
"This needs to be confirmed...";
26 $this->o =
new Objective\AdminConfirmedObjective($this->message);
31 $this->assertIsString($this->o->getHash());
36 $other =
new Objective\AdminConfirmedObjective(
"");
37 $this->assertNotEquals($this->o->getHash(), $other->getHash());
42 $this->assertIsString($this->o->getLabel());
47 $this->assertFalse($this->o->isNotable());
52 $env = $this->createMock(Setup\Environment::class);
54 $pre = $this->o->getPreconditions($env);
55 $this->assertEquals([], $pre);
60 $env = $this->createMock(Setup\Environment::class);
61 $admin_interaction = $this->createMock(Setup\AdminInteraction::class);
64 ->method(
"getResource")
65 ->will($this->returnValueMap([
70 ->expects($this->once())
71 ->method(
"confirmOrDeny")
72 ->with($this->message)
75 $res = $this->o->achieve($env);
76 $this->assertSame($env,
$res);
81 $this->expectException(Setup\NoConfirmationException::class);
83 $env = $this->createMock(Setup\Environment::class);
84 $admin_interaction = $this->createMock(Setup\AdminInteraction::class);
87 ->method(
"getResource")
88 ->will($this->returnValueMap([
93 ->expects($this->once())
94 ->method(
"confirmOrDeny")
95 ->with($this->message)
98 $this->o->achieve($env);
testHashIsDifferentForDifferentMessages()
testAchieveWithConfirmation()
foreach($_POST as $key=> $value) $res
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const RESOURCE_ADMIN_INTERACTION