HEX
Server: Apache
System: Linux webm019.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: petsclubcc (68997)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/petsclubcc/shop/modules/ps_checkout/vendor/segmentio/analytics-php/test/ClientTest.php
<?php

require_once __DIR__ . '/../lib/Segment/Client.php';

class ClientTest extends PHPUnit_Framework_TestCase
{
    /** @test */
    public function it_uses_the_lib_curl_consumer_as_default()
    {
        $client = new Segment_Client('foobar', []);
        $this->assertInstanceOf(Segment_Consumer_LibCurl::class, $client->getConsumer());
    }
    
    /** @test */
    public function can_provide_the_consumer_configuration_as_string()
    {
        $client = new Segment_Client('foobar', [
            'consumer' => 'fork_curl',
        ]);
        $this->assertInstanceOf(Segment_Consumer_ForkCurl::class, $client->getConsumer());
    }
    
    /** @test */
    public function can_provide_a_class_namespace_as_consumer_configuration()
    {
        $client = new Segment_Client('foobar', [
            'consumer' => Segment_Consumer_ForkCurl::class,
        ]);
        $this->assertInstanceOf(Segment_Consumer_ForkCurl::class, $client->getConsumer());
    }
}