PATH:
home
/
centosnipponia
/
public_html
/
ts
/
vendor
/
microsoft
/
microsoft-graph
/
tests
/
Functional
<?php use PHPUnit\Framework\TestCase; use Microsoft\Graph\Test\GraphTestBase; use Microsoft\Graph\Model; class WebhooksTest extends TestCase { private $_client; protected function setUp(): void { $graphTestBase = new GraphTestBase(); $this->_client = $graphTestBase->graphClient; } /** * @group functional */ public function testWebhooks() { $sub = new Model\Subscription(); $sub->setChangeType("created,updated"); $sub->setNotificationUrl("https://webhook-sub-test.azurewebsites.net/api/WebhookTrigger"); $sub->setResource("/me/mailfolders('inbox')/messages"); $time = new \DateTime(); $time->add(new DateInterval("PT1H")); $sub->setExpirationDateTime($time); $this->_client->setApiVersion("beta"); $subResult = $this->_client->createRequest("POST", "/subscriptions") ->attachBody($sub) ->setReturnType(Model\Subscription::class) ->execute(); $this->assertNotNull($subResult); $this->assertEquals($sub->getResource(), $subResult->getResource()); } }
[+]
..
[-] AzureTest.php
[edit]
[-] ContactTest.php
[edit]
[-] DeltaQueryTest.php
[edit]
[-] EventTest.php
[edit]
[-] ExcelTest.php
[edit]
[-] GraphTestBase.php
[edit]
[-] MailTest.php
[edit]
[-] OnedriveTest.php
[edit]
[-] OnenoteTest.php
[edit]
[-] OpenTypeTest.php
[edit]
[-] PlannerTest.php
[edit]
[+]
Resources
[-] SharepointTest.php
[edit]
[-] TermStoreTest.php
[edit]
[-] TestConstants.php
[edit]
[-] UserTest.php
[edit]
[-] WebhooksTest.php
[edit]
[-] .htaccess.disabled
[edit]