Ejemplo n.º 1
0
 /**
  * @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'));
 }
Ejemplo n.º 2
0
 public function hasForeign(Models $models)
 {
     return !$models->isEmptyProperty($this->key);
 }
Ejemplo n.º 3
0
 public function hasForeign(Models $models)
 {
     return !$models->isEmptyProperty($this->getRepo()->getPrimaryKey());
 }