# wpvr/9.0.0/vendor/posthog/posthog-php/test/ConsumerForkCurlTest.php

WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress, version 9.0.0. 64 lines.

- Page: https://pluginprobe.com/plugins/wpvr/9.0.0/code/vendor/posthog/posthog-php/test/ConsumerForkCurlTest.php
- Raw: https://pluginprobe.com/plugins/wpvr/9.0.0/raw/vendor/posthog/posthog-php/test/ConsumerForkCurlTest.php
- Modified: 2026-04-02T11:52:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpvr/9.0.0/code/vendor/posthog/posthog-php/test/ConsumerForkCurlTest.php#L10-L20`.

```php
<?php

namespace PostHog\Test;

use PHPUnit\Framework\TestCase;
use PostHog\Client;

class ConsumerForkCurlTest extends TestCase
{
    private $client;

    public function setUp(): void
    {
        date_default_timezone_set("UTC");
        $this->client = new Client(
            "OnMMoZ6YVozrgSBeZ9FpkC0ixH0ycYZn",
            array(
                "consumer" => "fork_curl",
                "debug" => true,
            )
        );
    }

    public function testCapture(): void
    {
        self::assertTrue(
            $this->client->capture(
                array(
                    "distinctId" => "some-user",
                    "event" => "PHP Fork Curl'd\" Event",
                )
            )
        );
    }

    public function testIdentify(): void
    {
        self::assertTrue(
            $this->client->identify(
                array(
                    "distinctId" => "user-id",
                    "properties" => array(
                        "loves_php" => false,
                        "type" => "consumer fork-curl test",
                        "birthday" => time(),
                    ),
                )
            )
        );
    }

    public function testAlias(): void
    {
        self::assertTrue(
            $this->client->alias(
                array(
                    "alias" => "alias-id",
                    "distinctId" => "user-id",
                )
            )
        );
    }
}

```
