person = PersonFactory::createOne( [ 'username' => 'username', 'password' => 'password' ] ); $this->organization = OrganizationFactory::createOne([ 'legalStatus' => LegalEnum::ASSOCIATION_LAW_1901()->getValue(), 'principalType' => PrincipalTypeEnum::ARTISTIC_EDUCATION_ONLY()->getValue(), 'name' => 'My Organization' ]); $this->settings = SettingsFactory::createOne([ 'product' => SettingsProductEnum::ARTIST(), 'organization' => $this->organization ]); $this->access = AccessFactory::createOne([ 'person' => $this->person, 'organization' => $this->organization, 'roles' => ['ROLE_USERS_VIEW'] ]); } public function testPersonGet(): void { $this->loginAs($this->access); $this->get('/api/people/' . $this->person->getId()); $this->validateCollectionSchema(Person::class); $this->assertJsonContains([ '@context' => '/api/contexts/Person', '@id' => '/api/people/' . $this->person->getId(), '@type' => 'Person', 'username' => 'username' ]); } public function testPersonGetCollection(): void { // TODO: get collection is not permitted } public function testPersonPut(): void { // TODO: put is not permitted } public function testPersonPost(): void { // TODO: post is not permitted } public function testPersonDelete(): void { // TODO: delete is not permitted } }