spec\LdapTools\Object\LdapObjectManagerSpec::it_should_not_call_the_event_dispatcher_modify_events_when_an_object_has_not_changed PHP Метод

it_should_not_call_the_event_dispatcher_modify_events_when_an_object_has_not_changed() публичный Метод

public it_should_not_call_the_event_dispatcher_modify_events_when_an_object_has_not_changed ( LdapTools\Event\EventDispatcherInterface $dispatcher, $connection )
$dispatcher LdapTools\Event\EventDispatcherInterface
    function it_should_not_call_the_event_dispatcher_modify_events_when_an_object_has_not_changed(EventDispatcherInterface $dispatcher, $connection)
    {
        $this->beConstructedWith($connection, $this->objectSchemaFactory, $dispatcher);
        $ldapObject = new LdapObject(['dn' => 'cn=foo,dc=foo,dc=bar'], 'user');
        $beforeEvent = new LdapObjectEvent(Event::LDAP_OBJECT_BEFORE_MODIFY, $ldapObject);
        $afterEvent = new LdapObjectEvent(Event::LDAP_OBJECT_AFTER_MODIFY, $ldapObject);
        $dispatcher->dispatch($beforeEvent)->shouldNotBeCalled();
        $dispatcher->dispatch($afterEvent)->shouldNotBeCalled();
        $this->persist($ldapObject);
    }