. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Webtrees\Services\CalendarService; use Fisharebest\Webtrees\TestCase; use Fisharebest\Webtrees\Tree; /** * Test harness for the class UpcomingAnniversariesModule * * @covers \Fisharebest\Webtrees\Module\UpcomingAnniversariesModule */ class UpcomingAnniversariesModuleTest extends TestCase { /** * @return void */ public function testModule(): void { $tree = $this->createStub(Tree::class); $calendar_service = $this->createStub(CalendarService::class); $module = new UpcomingAnniversariesModule($calendar_service); self::assertInstanceOf(ModuleBlockInterface::class, $module); self::assertTrue($module->loadAjax()); self::assertTrue($module->isTreeBlock()); self::assertTrue($module->isUserBlock()); self::assertIsString($module->editBlockConfiguration($tree, 1)); $request = self::createRequest(); $module->saveBlockConfiguration($request, 1); self::assertIsString($module->getBlock($tree, 1, ModuleBlockInterface::CONTEXT_EMBED)); } }