child('foo', FakeType::thatWillAccept('foo'), 'foo'); $childB = $shell->child('bar', FakeType::thatWillAccept('bar'), 'bar'); $children = [ Node::leaf($childA, 'foo')->withMessage($message)->withMessage($error)->withMessage($message), Node::leaf($childB, 'bar')->withMessage($message)->withMessage($error)->withMessage($message), ]; $node = Node::branch($shell, [], $children); $errors = (new CannotMapObject($node))->describe(); self::assertSame([ 'foo' => [$error], 'bar' => [$error], ], $errors); } }