first commit
This commit is contained in:
40
test/PluginTest.php
Normal file
40
test/PluginTest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Sabre\VObject;
|
||||
use Aerex\Taskwarrior;
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
|
||||
|
||||
class PluginTest extends \PHPUnit\Framework\TestCase {
|
||||
|
||||
protected $cal;
|
||||
protected $pluginInstance;
|
||||
|
||||
function setup(){
|
||||
$this->$cal = new Componet\VCalendar();
|
||||
$pluginInstance = new Plugin();
|
||||
|
||||
}
|
||||
|
||||
function testCreateSimpleTask() {
|
||||
$expectedTaskDescription = "Going to the Movies";
|
||||
$expectedStartTime = new \DateTime("2018-03-13 09:33:00Z");
|
||||
$expectedEndTime = new \DateTime("2018-03-13 10:45:00Z");
|
||||
|
||||
$vCalendarObjectEvent = $this->$cal->add('VEVENT', [
|
||||
"UID" => "1ff0313e-1ffa-4a18-b8c1-449bddc9109c",
|
||||
"SUMMARY" => $expectedTaskDescription,
|
||||
"DTSTART" => $expectedStartTime,
|
||||
"DTEND" => $expectedEndTime
|
||||
], false);
|
||||
|
||||
|
||||
$this->$pluginInstance->processCalendarEventForTaskwarrior($vCalendarObjectEvent);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user