1

我正在使用 Codeception 来测试启用了 Doctrine2 模块的 Symfony 3.4 项目。

问题是我无法访问通过调用grabEntityFromRepository()函数接收到的实体上的相关实体。所以如果我这样做:

$person = $I->grabEntityFromRepository('AppBundle:Person', ['id' => 1]);
$address = $person->getAddress(); // Address is a one to one related entity to person

$address变量为 NULL 。

这是预期的行为还是可以在配置中的某个地方进行调整?

4

0 回答 0