hollodotme\MilestonES\Test\Unit\Aggregates\AggregateRootCollection
- Can attach aggregate root
- Attaching same aggregate root more than once has no effect
- Two aggregate roots with different identifier classes but same id can be attached
- Two aggregate roots with different ids can be attached
- Attaching two aggregate roots with same id fails
- Aggregate root can be found by id when attached
- Aggregate roots with different identifier classes but same id can be found when attached
- Can loop over collection more than once
- Finding not attached aggregate root by id fails
- Can get changes of all aggregate roots in collection in correct order
- Can clear changes in aggregate roots
hollodotme\MilestonES\Test\Unit\Aggregates\AggregateRootRepository
- Can track an aggregate root
- Can get a tracked aggregate root by id
- Can get aggregate root reconstituted from history
- Can get aggregate root from event stream fails when aggregate root class is invalid
- Get aggregate root from event stream fails when nothing tracked and event stream not found
- Can register event observers
hollodotme\MilestonES\Test\Unit\Aggregates\AggregateRoot
- Schedule triggers and applies change with id
- Can be reconstituted from history
- Changes can be cleared
hollodotme\MilestonES\Test\Unit\EventStore\CommitEventEnvelope
hollodotme\MilestonES\Test\Unit\EventStore\DomainEventEnvelopeCollection
- Collection is empty after contruction
- Collection is not empty after adding events
- Adding an item fails when it is not a domain event envelope
- Collection takes auto and concrete index
- Envelopes can be removed from collection using unset
- Can loop multiple times over collection
- Can sort collection by callable
- Can append collection to collection
hollodotme\MilestonES\Test\Unit\EventStore\EventEnvelopeMapper
- Put event in envelope for commit
- Extract event from envelope
hollodotme\MilestonES\Test\Unit\EventStore\EventStore
- Can attach and notify observers when event is committed
- Can attach and notify global observers when event is committed
- Can attach and notify global and specific observers when event is committed
- Can detach observers
- Get event stream for id fails when event stream not found
- Get event stream for id fails when event stream is empty
- Get event stream for id
- Commit events fails when persistence fails
- Get event stream for id fails when event envelopes collection is not iteratable
- Get event stream for id fails when event envelopes collection is not countable
- Get event stream for id with countable iterator
hollodotme\MilestonES\Test\Unit\EventStore\ImmutableEventCollection
- Adding events by array access after construction fails
- Adding events by offset set after construction fails
- Removing an event by unset after construction fails
- Removing an event by offset unset after construction fails
- Construction with array of non domain event envelopes fails
hollodotme\MilestonES\Test\Unit\Identifiers\ClassNameIdentifier
- Class name is represented as canonical string
- Construction fails on invalid class names
- Class name is reconstituted from canonical
- Class basename is extracted from fcqn
hollodotme\MilestonES\Test\Unit\Identifiers\Contract
- Objects can be used as id
hollodotme\MilestonES\Test\Unit\Identifiers\Identifier
- Represents a string
- Numbers will be converted to strings
- Non scalars as id will throw an exception
- Can be constructed from string
- Can be contructed from numbers
- Cannot be contructed from expressions
- Equals
- Equals fails on different classes
- Equals fails on different id string
- Representable as json
hollodotme\MilestonES\Test\Unit\Persistance\Memory
- Is not in transaction after construction
- Begin transaction
- Begin transaction fails when transacion is already started
- Commit transaction
- Commit transaction fails when transaction is not started
- Rollback transaction
- Rollback transaction fails when no transaction is started
- Commit transaction fails when transaction is rolled back
- Rollback transaction fails when transaction is committed
- Persist event envelope
- Persist event envelope fails when not in transaction
- Get event envelopes with id
- Get event envelopes with id fails when stream id not found
- Get event envelopes with id fails when envelopes are not committed
- Files will be restored on reconstitution
- Restoring files on reconstituion fails when restore dir does not exist
hollodotme\MilestonES\Test\Unit\Serialization\PhpSerializer
- Serialize data
- Unserialize data
- Unserialize data inverts serialized data
hollodotme\MilestonES\Test\Unit\Serialization\SerializationStrategy
- Construction fails when default contract is not registered
- Get default serializer
- Get default contract
- Get serializer for contract
- Get serializer for contract fails when contract is not registered
hollodotme\MilestonES\Test\Unit\Serialization\SerializerRegistry
- Can override serializer for same contract
- Can register same serializer for different contracts
- Is contract registered
- Get serializer for contract
- Get serializer for contract fails when contract is not registered