ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Tests\Setup\CallableObjectiveTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Setup\CallableObjectiveTest:
+ Collaboration diagram for ILIAS\Tests\Setup\CallableObjectiveTest:

Public Member Functions

 myMethod (Setup\Environment $environment)
 
 setUp ()
 
 testGetHash ()
 
 testGetLabel ()
 
 testIsNotable ()
 
 testGetPreconditions ()
 
 testAchieve ()
 

Data Fields

const NAME = "CALL MY METHOD!"
 

Detailed Description

Definition at line 11 of file CallableObjectiveTest.php.

Member Function Documentation

◆ myMethod()

ILIAS\Tests\Setup\CallableObjectiveTest::myMethod ( Setup\Environment  $environment)

Definition at line 15 of file CallableObjectiveTest.php.

16  {
17  $this->env = $environment;
18  return $environment;
19  }

◆ setUp()

ILIAS\Tests\Setup\CallableObjectiveTest::setUp ( )

Definition at line 23 of file CallableObjectiveTest.php.

23  : void
24  {
25  $this->p = $this->newObjective();
26 
27  $this->o = new Setup\CallableObjective(
28  [$this, "myMethod"],
29  self::NAME,
30  false,
31  $this->p
32  );
33  }

◆ testAchieve()

ILIAS\Tests\Setup\CallableObjectiveTest::testAchieve ( )

Definition at line 59 of file CallableObjectiveTest.php.

References $res.

60  {
61  $this->env = null;
62 
63  $env = $this->createMock(Setup\Environment::class);
64 
65  $res = $this->o->achieve($env);
66  $this->assertSame($env, $res);
67  $this->assertSame($this->env, $env);
68  }
foreach($_POST as $key=> $value) $res

◆ testGetHash()

ILIAS\Tests\Setup\CallableObjectiveTest::testGetHash ( )

Definition at line 35 of file CallableObjectiveTest.php.

36  {
37  $this->assertIsString($this->o->getHash());
38  }

◆ testGetLabel()

ILIAS\Tests\Setup\CallableObjectiveTest::testGetLabel ( )

Definition at line 40 of file CallableObjectiveTest.php.

41  {
42  $this->assertEquals(self::NAME, $this->o->getLabel());
43  }

◆ testGetPreconditions()

ILIAS\Tests\Setup\CallableObjectiveTest::testGetPreconditions ( )

Definition at line 50 of file CallableObjectiveTest.php.

51  {
52  $env = $this->createMock(Setup\Environment::class);
53 
54  $pre = $this->o->getPreconditions($env);
55  $this->assertEquals([$this->p], $pre);
56  }

◆ testIsNotable()

ILIAS\Tests\Setup\CallableObjectiveTest::testIsNotable ( )

Definition at line 45 of file CallableObjectiveTest.php.

46  {
47  $this->assertFalse($this->o->isNotable());
48  }

Field Documentation

◆ NAME

const ILIAS\Tests\Setup\CallableObjectiveTest::NAME = "CALL MY METHOD!"

Definition at line 21 of file CallableObjectiveTest.php.


The documentation for this class was generated from the following file: