/** * Tests Registry->__toString(). */ public function testGetLogsCount() { $this->assertEquals(0, $this->registry->getLogsCount()); for ($i = 1; $i < 3; ++$i) { $logs[$i] = new Log(); $this->registry->addLog($logs[$i]); $this->assertEquals($i, $this->registry->getLogsCount()); } }
/** * Add registry. * * @param Registry $registry * * @return Log */ public function addRegistry(Registry $registry) { //AT - Do not remove the next line. $registry->addLog($this); // synchronously updating inverse side $this->registries[] = $registry; return $this; }