You are here

public function Behavior::withAssertion in Drupal 7

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;
}