Resources
5 years ago
AzureTest.php
1 year ago
ContactTest.php
5 years ago
DeltaQueryTest.php
1 year ago
EventTest.php
5 years ago
ExcelTest.php
1 year ago
GraphTestBase.php
1 year ago
MailTest.php
1 year ago
OnedriveTest.php
1 year ago
OnenoteTest.php
1 year ago
OpenTypeTest.php
1 year ago
PlannerTest.php
1 year ago
SharepointTest.php
1 year ago
TermStoreTest.php
1 year ago
TestConstants.php
1 year ago
UserTest.php
1 year ago
WebhooksTest.php
1 year ago
EventTest.php
27 lines
| 1 | <?php |
| 2 | use PHPUnit\Framework\TestCase; |
| 3 | use Microsoft\Graph\Test\GraphTestBase; |
| 4 | use Microsoft\Graph\Model; |
| 5 | |
| 6 | class EventTest extends TestCase |
| 7 | { |
| 8 | /** |
| 9 | * @group functional |
| 10 | */ |
| 11 | public function testGetCalendarView() |
| 12 | { |
| 13 | $graphTestBase = new GraphTestBase(); |
| 14 | $client = $graphTestBase->graphClient; |
| 15 | |
| 16 | $startTime = new DateTime('today midnight'); |
| 17 | $startTime = $startTime->format('Y-m-d H:i:s'); |
| 18 | $endTime = new DateTime('tomorrow midnight'); |
| 19 | $endTime = $endTime->format('Y-m-d H:i:s'); |
| 20 | |
| 21 | $todaysEvents = $client->createRequest("GET", "/me/calendarView?startDateTime=$startTime&endDateTime=$endTime") |
| 22 | ->setReturnType(Model\Event::class) |
| 23 | ->execute(); |
| 24 | |
| 25 | $this->assertNotNull($todaysEvents); |
| 26 | } |
| 27 | } |