PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.72
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.72
9.1.3 9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 All 222 releases
wpvr / vendor / posthog / posthog-php / test / ConsumerLibCurlTest.php

ConsumerLibCurlTest.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.72, at vendor/posthog/posthog-php/test/ConsumerLibCurlTest.php

64 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PostHog\Test;
4
5 use PHPUnit\Framework\TestCase;
6 use PostHog\Client;
7
8 class ConsumerLibCurlTest extends TestCase
9 {
10 private $client;
11
12 public function setUp(): void
13 {
14 date_default_timezone_set("UTC");
15 $this->client = new Client(
16 "BrpS4SctoaCCsyjlnlun3OzyNJAafdlv__jUWaaJWXg",
17 [
18 "consumer" => "lib_curl",
19 "debug" => true,
20 ]
21 );
22 }
23
24 public function testCapture(): void
25 {
26 self::assertTrue(
27 $this->client->capture(
28 array(
29 "distinctId" => "lib-curl-capture",
30 "event" => "PHP Lib Curl'd\" Event",
31 )
32 )
33 );
34 }
35
36 public function testIdentify(): void
37 {
38 self::assertTrue(
39 $this->client->identify(
40 array(
41 "distinctId" => "lib-curl-identify",
42 "properties" => array(
43 "loves_php" => false,
44 "type" => "consumer lib-curl test",
45 "birthday" => time(),
46 ),
47 )
48 )
49 );
50 }
51
52 public function testAlias(): void
53 {
54 self::assertTrue(
55 $this->client->alias(
56 array(
57 "alias" => "lib-curl-alias",
58 "distinctId" => "user-id",
59 )
60 )
61 );
62 }
63 }
64