• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-php / #7087

pending completion
#7087

push

php-coveralls

pakrym-stripe
Bump version to 10.14.0-beta.2

1831 of 2732 relevant lines covered (67.02%)

3.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/TestHelpers/TestClock.php
1
<?php
2

3
// File generated from our OpenAPI spec
4

5
namespace Stripe\TestHelpers;
6

7
/**
8
 * A test clock enables deterministic control over objects in testmode. With a test clock, you can create
9
 * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances,
10
 * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time.
11
 *
12
 * @property string $id Unique identifier for the object.
13
 * @property string $object String representing the object's type. Objects of the same type share the same value.
14
 * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
15
 * @property int $deletes_after Time at which this clock is scheduled to auto delete.
16
 * @property int $frozen_time Time at which all objects belonging to this clock are frozen.
17
 * @property bool $livemode Has the value <code>true</code> if the object exists in live mode or the value <code>false</code> if the object exists in test mode.
18
 * @property null|string $name The custom name supplied at creation.
19
 * @property string $status The status of the Test Clock.
20
 */
21
class TestClock extends \Stripe\ApiResource
22
{
23
    const OBJECT_NAME = 'test_helpers.test_clock';
24

25
    use \Stripe\ApiOperations\All;
26
    use \Stripe\ApiOperations\Create;
27
    use \Stripe\ApiOperations\Delete;
28
    use \Stripe\ApiOperations\Retrieve;
29

30
    const STATUS_ADVANCING = 'advancing';
31
    const STATUS_INTERNAL_FAILURE = 'internal_failure';
32
    const STATUS_READY = 'ready';
33

34
    /**
35
     * @param null|array $params
36
     * @param null|array|string $opts
37
     *
38
     * @throws \Stripe\Exception\ApiErrorException if the request fails
39
     *
40
     * @return \Stripe\TestHelpers\TestClock the advanced test clock
41
     */
42
    public function advance($params = null, $opts = null)
43
    {
44
        $url = $this->instanceUrl() . '/advance';
×
45
        list($response, $opts) = $this->_request('post', $url, $params, $opts);
×
46
        $this->refreshFrom($response, $opts);
×
47

48
        return $this;
×
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc