Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/test.tradze.com/vendor/stripe-php/tests/Stripe/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/test.tradze.com/vendor/stripe-php/tests/Stripe/EphemeralKeyTest.php
<?php

namespace Stripe;

class EphemeralKeyTest extends TestCase
{
    public function testIsCreatable()
    {
        $this->expectsRequest(
            'post',
            '/v1/ephemeral_keys',
            null,
            array("Stripe-Version: 2017-05-25")
        );
        $resource = EphemeralKey::create(array(
            "customer" => "cus_123",
        ), array("stripe_version" => "2017-05-25"));
        $this->assertInstanceOf("Stripe\\EphemeralKey", $resource);
    }

    /**
     * @expectedException \InvalidArgumentException
     */
    public function testIsNotCreatableWithoutAnExplicitApiVersion()
    {
        $resource = EphemeralKey::create(array(
            "customer" => "cus_123",
        ));
    }

    public function testIsDeletable()
    {
        $key = EphemeralKey::create(array(
            "customer" => "cus_123",
        ), array("stripe_version" => "2017-05-25"));
        $this->expectsRequest(
            'delete',
            '/v1/ephemeral_keys/' . $key->id
        );
        $resource = $key->delete();
        $this->assertInstanceOf("Stripe\\EphemeralKey", $resource);
    }
}

ZeroDay Forums Mini