function Behavior::withAssertion

Parameters

Assertable $assertable:

Return value

static

File

misc/typo3/phar-stream-wrapper/src/Behavior.php, line 48

Class

Behavior

Namespace

TYPO3\PharStreamWrapper

Code

public function withAssertion(Assertable $assertable) {
    $commands = func_get_args();
    array_shift($commands);
    $this->assertCommands($commands);
    $commands = $commands ?: $this->availableCommands;
    $target = clone $this;
    foreach ($commands as $command) {
        $target->assertions[$command] = $assertable;
    }
    return $target;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.