public function testIsEmpty() { $this->assertTrue($this->collection->isEmpty()); $this->collection->add($this->server1); $this->assertFalse($this->collection->isEmpty()); $this->collection->clear(); $this->assertTrue($this->collection->isEmpty()); }
/** * {@inheritdoc} */ public function hasServers(Expression $expr = null) { $this->assertServersLoaded(); if (!$expr) { return !$this->servers->isEmpty(); } foreach ($this->servers as $server) { if ($server->match($expr)) { return true; } } return false; }