public function testContains() { $collection = new CAttributeCollection(); $this->assertFalse($collection->contains('Property')); $collection->Property = 'value'; $this->assertTrue($collection->contains('Property')); }
public function testContains() { $collection = new CAttributeCollection(); $this->assertEquals(false, $collection->contains('Property')); $collection->Property = 'value'; $this->assertEquals(true, $collection->contains('Property')); }
public function contains($key) { if (!parent::contains($key)) { return $this->loadParam($key); } return true; }
/** * Returns whether there is an element at the specified offset. * This method is required by the interface ArrayAccess. * @param mixed $offset the offset to check on * @return boolean */ public function offsetExists($offset) { return $this->_attributes->contains($offset); }