/** * https://github.com/stibiumz/phalcon.eager-loading/issues/4 */ public function testShouldLoadChildOfEmptyParentWithoutException() { // Has many -> Belongs to // Should be the same for Has many -> Has one $loader = new Loader(Robot::findFirstById(1), 'Bugs.Robot'); $this->assertEquals($loader->execute()->get()->bugs, []); }
/** * At original repo */ public function testIssue4() { // Has many -> Belongs to // Should be the same for Has many -> Has one $loader = new Loader(Robot::findFirstById(1), 'Bugs.Robot'); $this->assertEquals($loader->execute()->get()->bugs, array()); }