A generated test for an existing class, which is the case model assistance is genuinely good at, with one caveat.
// generated, and correct
public function testItRejectsANegativeQuantity(): void
{
$this->expectException(InvalidQuantity::class);
new OrderLine(new Sku('ABC'), -1, Money::pence(100));
}
// also generated, and useless
public function testConstructorSetsProperties(): void
{
$line = new OrderLine(new Sku('ABC'), 2, Money::pence(100));
self::assertSame(2, $line->quantity);
}
The second test asserts that assignment works, which is a test of the language, and generated suites produce a lot of them. Reading them as review rather than accepting them is the whole discipline — the first test is worth having and would probably not have been written, and the ratio in our experience is about one useful test in three.