/**
  * Generate scope list
  *
  * @param MethodGenerator $constructorGenerator
  * @param array $scopes
  * @throws \InvalidArgumentException
  */
 protected function generateScopeList(MethodGenerator $constructorGenerator, array $scopes)
 {
     $constructorGenerator->defLine('$this->scopes = [');
     /**
      * @var string $scopeName
      * @var array $ids
      */
     foreach ($scopes as $scopeName => $ids) {
         $constructorGenerator->defLine("\t'{$scopeName}' => [");
         // Iterate service ids
         foreach ($ids as $id) {
             $constructorGenerator->defLine("\t\t'{$id}',");
         }
         $constructorGenerator->defLine("\t]");
     }
     $constructorGenerator->defLine('];');
 }
 public function testDefFinalAbstractFunctionException()
 {
     $this->expectException(\InvalidArgumentException::class);
     $this->generator->defFinal()->defAbstract()->code();
 }