Collections\Dictionary::count PHP Method

count() public method

public count ( )
    public function count()
    {
        return count($this->storage);
    }

Usage Example

Exemplo n.º 1
0
 public function testArrayAccess()
 {
     $this->coll['keyOne'] = 'one';
     $this->coll['keyTwo'] = 'two';
     $this->assertEquals($this->coll['keyOne'], 'one');
     $this->assertEquals($this->coll['keyTwo'], 'two');
     unset($this->coll['keyOne']);
     $this->assertEquals($this->coll->count(), 1);
     $this->assertTrue(isset($this->coll['keyTwo']));
 }