create(); $schema = FormSchema::factory()->create([ 'owner_type' => 'event', 'owner_id' => $event->id, ]); $result = (new SchemaHasLinkedEvent())->evaluate($schema); $this->assertTrue($result->passed); } public function test_fails_when_owner_type_is_not_event(): void { $schema = FormSchema::factory()->create([ 'owner_type' => 'organisation', 'owner_id' => null, ]); $result = (new SchemaHasLinkedEvent())->evaluate($schema); $this->assertFalse($result->passed); } }