0
0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2024-11-22 16:02:36 +00:00
salesagility_SuiteCRM/tests/unit/phpunit/modules/iCals/iCalTest.php
Dillon-Brown 26aab7535d Move test namespaces into autoload-dev
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-09-08 16:49:16 +01:00

37 lines
1.3 KiB
PHP

<?php
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
require_once 'modules/iCals/iCal.php';
class iCalTest extends SuitePHPUnitFrameworkTestCase
{
public function test__construct(): void
{
self::markTestIncomplete('environment dependency');
// Execute the constructor and check for the Object type and attributes
$ical = new iCal();
self::assertInstanceOf('iCal', $ical);
self::assertInstanceOf('vCal', $ical);
self::assertInstanceOf('SugarBean', $ical);
}
// public function testgetVcalIcal()
// {
// //error_reporting(E_ERROR | E_PARSE);
//
// $ical = new iCal();
// $user = new User(1);
//
// //break the string in two pieces leaving out date part.
// $expectedStart = "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nMETHOD:PUBLISH\r\nX-WR-CALNAME: (SugarCRM)\r\nPRODID:-//SugarCRM//SugarCRM Calendar//EN\r\nBEGIN:VTIMEZONE\r\nTZID:\r\nX-LIC-LOCATION:\r\nEND:VTIMEZONE\r\nCALSCALE:GREGORIAN";
// $expectedEnd = "\r\nEND:VCALENDAR\r\n";
//
// $actual = $ical->getVcalIcal($user, 6);
//
// //match the leading and trailing string parts to verify it returns expected results
// $this->assertStringStartsWith($expectedStart, $actual);
// $this->assertStringEndsWith($expectedEnd, $actual);
// }
}