public function createAggregateJail($aggregate, $typeOrAlias) { $type = $this->typeAliasManager->getType($typeOrAlias) ?: $typeOrAlias; return $this->jailFactory->createAggregateJail($aggregate, $type); }
public function testInvalidTypeForAggregateClass() { $this->setExpectedException(InvalidArgumentException::class, 'Expected type to be "string", got "array"'); $this->factory->createAggregateJail([], []); }