/** * Test associations with plugin names. * * @return void */ public function testAddHasRemoveGetWithPlugin() { $this->assertFalse($this->associations->has('Photos.Photos')); $this->assertFalse($this->associations->has('Photos')); $belongsTo = new BelongsTo(''); $this->assertSame($belongsTo, $this->associations->add('Photos.Photos', $belongsTo)); $this->assertTrue($this->associations->has('Photos')); $this->assertFalse($this->associations->has('Photos.Photos')); }
/** * Returns whether an association named after the passed value * exists for this table. * * @param string $property the association name * @return bool */ public function __isset($property) { return $this->_associations->has($property); }