# radicle pest unit test setup

**URL:** https://discourse.roots.io/t/radicle-pest-unit-test-setup/29922
**Category:** radicle
**Created:** 2025-09-19T13:55:01Z
**Posts:** 5

## Post 1 by @selu — 2025-09-19T13:55:02Z

Hi,

I’m trying to set up testing in a Radicle project that uses Eloquent models. I attempted to use the default Radicle testing setup, but it fails with the following error:

```
Call to a member function connection() on null

at vendor/illuminate/database/Eloquent/Model.php:1851
1847▕ * @return \Illuminate\Database\Connection
1848▕ */
1849▕ public static function resolveConnection($connection = null)
1850▕ {
➜1851▕ return static::$resolver->connection($connection);
1852▕ }
1853▕
```

Do you have any recommendations for resolving this?

Thanks a lot!

---

## Post 2 by @ben — 2025-09-19T15:50:00Z

Can you please provide me with the necessary changes so I can reproduce this?

---

## Post 3 by @selu — 2025-09-19T16:21:20Z

Sure, I’ve attached a patch with the changes against the current Radicle repo. I might be missing something obvious, so any guidance or feedback would be appreciated. [Subject: [PATCH] patch to replicate the test---Index: app/Models/Asset.php - Pastebin.com](https://pastebin.com/bwUnhh4Y)

---

## Post 4 by @ben — 2025-09-19T17:38:08Z

Thank you! Can you try the change I DM’d you? We need to fix the database provider in Acorn

---

## Post 5 by @ben — 2025-09-21T13:26:24Z

For any folks using Radicle that are interested in how to configure Eloquent, check out [https://github.com/roots/radicle/pull/247](https://github.com/roots/radicle/pull/247)
