PluginProbe
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell / 3.13.1
WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell v3.13.1
3.13.1 3.13.0 3.12.13 3.12.12 3.12.11 3.12.10 3.12.9 3.12.8 3.12.7 3.12.6 3.12.5 3.12.4 3.12.3 3.12.1 3.12.2 3.12.0 3.11.1 3.11.0 3.10.9 3.10.8 3.10.7 3.10.6 2.8.16 2.8.17 2.8.18 All 259 releases
wpfunnels / vendor / posthog / posthog-php / test / ConsumerLibCurlTest.php

ConsumerLibCurlTest.php in WPFunnels – Funnel Builder for WooCommerce with Checkout & One Click Upsell 3.13.1, 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