PhpSpec\Runner\CollaboratorManager::set PHP Method

set() public method

public set ( string $name, Collaborator $collaborator )
$name string
$collaborator PhpSpec\Wrapper\Collaborator
    public function set($name, $collaborator)
    {
        $this->collaborators[$name] = $collaborator;
    }

Usage Example

コード例 #1
0
 public function prepare(ExampleNode $example, SpecificationInterface $context, MatcherManager $matchers, CollaboratorManager $collaborators)
 {
     $this->prophet = new Prophet(null, $this->unwrapper, null);
     foreach ($this->getIterators($example) as $name => $class) {
         $collaborators->set($name, new Collaborator($this->prophet->prophesize(), $class));
     }
 }
All Usage Examples Of PhpSpec\Runner\CollaboratorManager::set