/** * @covers ::isEmptyProperty */ public function testIsEmptyProperty() { $models = new Models([new Model(['id' => 10, 'name' => null]), new Model(['id' => 20, 'name' => null]), new Model(['id' => null, 'name' => null])]); $this->assertFalse($models->isEmptyProperty('id')); $this->assertTrue($models->isEmptyProperty('name')); }
public function hasForeign(Models $models) { return !$models->isEmptyProperty($this->key); }
public function hasForeign(Models $models) { return !$models->isEmptyProperty($this->getRepo()->getPrimaryKey()); }