# wp-stateless/2.1.4/lib/Google/vendor/react/promise/tests/TestCase.php

WP-Stateless – Google Cloud Storage, version 2.1.4. 44 lines.

- Page: https://pluginprobe.com/plugins/wp-stateless/2.1.4/code/lib/Google/vendor/react/promise/tests/TestCase.php
- Raw: https://pluginprobe.com/plugins/wp-stateless/2.1.4/raw/lib/Google/vendor/react/promise/tests/TestCase.php
- Modified: 2018-04-06T08:15:54+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/wp-stateless/2.1.4/code/lib/Google/vendor/react/promise/tests/TestCase.php#L10-L20`.

```php
<?php

namespace React\Promise;

class TestCase extends \PHPUnit_Framework_TestCase
{
    public function expectCallableExactly($amount)
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->exactly($amount))
            ->method('__invoke');

        return $mock;
    }

    public function expectCallableOnce()
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->once())
            ->method('__invoke');

        return $mock;
    }

    public function expectCallableNever()
    {
        $mock = $this->createCallableMock();
        $mock
            ->expects($this->never())
            ->method('__invoke');

        return $mock;
    }

    public function createCallableMock()
    {
        return $this
            ->getMockBuilder('React\\Promise\Stub\CallableStub')
            ->getMock();
    }
}

```
