public function testAddDomain() { $domain1 = $this->getDomainMock('foo'); $domain2 = $this->getDomainMock('bar'); $database = new Database(); $database->addDomain($domain1); $database->addDomain($domain2); $this->assertSame($domain1, $database->getDomain('foo')); $this->assertSame($domain2, $database->getDomain('bar')); $this->assertNull($database->getDomain('baz')); }