Skip to content

Discussion: Testing with PharIO\GnuPG #26

@sebastianfeldmann

Description

@sebastianfeldmann

I'm a bit stuck. I'm trying to fix the current tests but I keep running into problems.

PHPUnit\Framework\MockObject\IncompatibleReturnValueException: Method import may not return value of type array, its declared return type is "void"

Was playing around with it a bit but always running into expected GnuPg got PharIO\GnuPg issues when testing without the extension.

I was thinking about hiding the two GnuPG implementations behind a GnuPGProxy and only type hint and Mock the proxy. So I don't have to deal with the type jougling.

But I'm not sure if if makes sense to implement it in this repo.

Maybe implementing it in phar-io/gnupg makes more sense. Then even phive could implement against the proxy api und would not care about the \GnuPg or PharIO\GnuPg magic.
It would always be GnuPgProxy (name still up for discussion).

Or am I just too blind to figure this little type mess out another way.

@theseer @heiglandreas what do you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions