public function testBuild_withCommandSerializer() { /** @var \PHPUnit_Framework_MockObject_MockObject|CommandSerializerInterface $commandSerializerMock */ $commandSerializerMock = $this->getMockBuilder(AbstractCommandSerializer::class)->getMockForAbstractClass(); $this->workerBuilder->withCommandSerializer($commandSerializerMock); $this->assertContains($commandSerializerMock, $this->workerBuilder->getConstructorArguments($this->getBeanieMock())); }