/** * @covers ::initialize */ public function testInitialize() { $repo = Location::getRepo(); $this->assertInstanceOf('Harp\\MP\\BelongsTo', $repo->getRel('parent')); $this->assertInstanceOf('Harp\\MP\\HasMany', $repo->getRel('children')); $location = new Location(); $this->assertFalse($location->validate()); $this->assertEquals('name must be present', $location->getErrors()->humanize()); $location->name = 'test'; $this->assertTrue($location->validate()); }