ILIAS  trunk Revision v12.0_alpha-1541-g23eaa5e013d
ILIAS\Glossary\Flashcard\FlashcardManagerTest Class Reference
+ Inheritance diagram for ILIAS\Glossary\Flashcard\FlashcardManagerTest:
+ Collaboration diagram for ILIAS\Glossary\Flashcard\FlashcardManagerTest:

Public Member Functions

 testSetSessionInitialTerms ()
 
 testSetSessionTerms ()
 

Protected Member Functions

 getManagerMock ()
 

Detailed Description

Definition at line 28 of file FlashcardManagerTest.php.

Member Function Documentation

◆ getManagerMock()

ILIAS\Glossary\Flashcard\FlashcardManagerTest::getManagerMock ( )
protected

Definition at line 30 of file FlashcardManagerTest.php.

30 : FlashcardManager
31 {
32 $domain = $this->getMockBuilder(InternalDomainService::class)->disableOriginalConstructor()->getMock();
33 $repo = $this->getMockBuilder(InternalRepoServiceInterface::class)->disableOriginalConstructor()->getMock();
34
35 return new class ($domain, $repo, 11, 99) extends FlashcardManager {
36 public function __construct(
37 InternalDomainService $domain_service,
38 Glossary\InternalRepoServiceInterface $repo,
39 int $glo_ref_id,
40 int $user_id
41 ) {
42 $this->domain = $domain_service;
43 $this->glo_id = $glo_ref_id;
44 $this->user_id = $user_id;
45 $this->session_repo = new FlashcardSessionArrayRepository();
46 }
47 };
48 }
__construct()
Constructor setup ILIAS global object @access public.
Definition: class.ilias.php:76

References $user_id, and ILIAS\__construct().

Referenced by ILIAS\Glossary\Flashcard\FlashcardManagerTest\testSetSessionInitialTerms(), and ILIAS\Glossary\Flashcard\FlashcardManagerTest\testSetSessionTerms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testSetSessionInitialTerms()

ILIAS\Glossary\Flashcard\FlashcardManagerTest::testSetSessionInitialTerms ( )

Definition at line 50 of file FlashcardManagerTest.php.

50 : void
51 {
52 $manager = $this->getManagerMock();
53 $terms = [123, 456, 789];
54
55 $manager->setSessionInitialTerms(55, $terms);
56
57 $this->assertSame($terms, $manager->getSessionInitialTerms(55));
58 }

References ILIAS\Glossary\Flashcard\FlashcardManagerTest\getManagerMock().

+ Here is the call graph for this function:

◆ testSetSessionTerms()

ILIAS\Glossary\Flashcard\FlashcardManagerTest::testSetSessionTerms ( )

Definition at line 60 of file FlashcardManagerTest.php.

60 : void
61 {
62 $manager = $this->getManagerMock();
63 $terms = [321, 654, 987];
64
65 $manager->setSessionTerms(77, $terms);
66
67 $this->assertSame($terms, $manager->getSessionTerms(77));
68 }

References ILIAS\Glossary\Flashcard\FlashcardManagerTest\getManagerMock().

+ Here is the call graph for this function:

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