I am testing my model in isolation and keep getting this error. I thought perhaps it is my assert function but I want to check if what list I created a new instance with is the same as the list found. Here is my model:
class ArchiveShoppingListModel
{
/**
* @var string
*/
private string $list;
/**
* ArchiveShoppingListModel constructor.
*
* @param string $list
*/
public function __construct(string $list)
{
$this->list = $list;
}
/**
* @return string
*/
public function getList(): string
{
return $this->list;
}
}
And here is my test:
class ArchiveShoppingListModelTest extends TestCase
{
/**
* @param string $list
* @return void
*/
public function test(string $list): void
{
$model = new ArchiveShoppingListModel('groceries');
$this->assertSame($list, $model->getList());
}
}