count() public method

public count ( )
示例#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']));
 }