Skip to content

[Feature Request] In test env - I can't unserialize object structure #623

@agoalofalife

Description

@agoalofalife

Hello guys! I came across with some strange things in testing env. Long story short, when i pass in mock acitvity some dto structure - sdk won't serialize it properly and as a result - later can't unserialize it.

$this->activityMocks->expectCompletion('Say.hello', new Greeting(
   name :  'Name',
  status: StatusUser::Active,
  // ... etc
));

The problem is ActivityMocker is created without custom converter for RoadRunnerActivityInvocationCache

  public function __construct(?ActivityInvocationCacheInterface $cache = null)
    {
        $this->cache = $cache ?? RoadRunnerActivityInvocationCache::create();
    }

Describe the solution you'd like

How about to add in ActivityMocker __construct() custom converter? Am i right - or am i doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions