createUser('tester', [ 'data' => [ 'Lead' => false, 'Opportunity' => [ 'create' => 'no', 'read' => 'own', 'edit' => 'no', 'delete' => 'no', 'stream' => 'no', ], ] ]); $this->auth('tester'); $this->setApplication($this->createApplication()); $data = $this->getInjectableFactory()->create(MetadataService::class)->getDataForFrontend(); $this->assertIsArray($data?->entityDefs?->Lead?->fields?->source?->options); $this->assertNull($data->entityDefs->Lead->fields?->name); } }