コード例 #1
0
 public function testObserversWillBeNotifiedOnChangeLocalPart()
 {
     $ob = new StubObserverImpl();
     $this->address->attachObserver($ob);
     $this->address->setLocalPart('test3');
     $this->assertTrue($ob->hasBeenCalled());
     $this->assertEquals(Address::EVENT_CHANGE_LOCAL_PART, $ob->getLastCallType());
 }
コード例 #2
0
 private function addInstance(AddressImpl $instance)
 {
     $this->addressList[$instance->getLocalPart()] = $instance;
     $instance->attachObserver($this);
 }