ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LightboxCardPageTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use PHPUnit\Framework\TestCase;
26
27class LightboxCardPageTest extends TestCase
28{
29 public function testGetTitlesReturnsCardTitle(): void
30 {
31 $title = 'Foobar';
32 $card = $this->getMockBuilder(Card::class)->disableOriginalConstructor()->getMock();
33 $card->expects(self::once())->method('getTitle')->willReturn($title);
34 $this->assertEquals($title, (new LightboxCardPage($card))->getTitle());
35 }
36
37 public function testGetComponentReturnsCard(): void
38 {
39 $card = $this->getMockBuilder(Card::class)->disableOriginalConstructor()->getMock();
40 $this->assertEquals($card, (new LightboxCardPage($card))->getComponent());
41 }
42}