H
H
HellWalk2020-12-25 15:00:30
PHP
HellWalk, 2020-12-25 15:00:30

Is it possible to make Symfony + gRPC + Codeception friends?

Codeception, in order to build the Kernel symphony, you need the appropriate module:

modules:
    enabled:
        -   Symfony:
                app_path: 'src'
                environment: 'test'


And at the same time, it is worth putting
composer require codeception/module-symfony --dev

Without changing anything else at all, tests (even one banal test assertTrue (true)) fall with an error:

Expected to find class "App\Grpc\..." in file "/var/www/..." while importing services from resource "../src/*", but it was not found! Check the namespace prefix used with the resource in /var/www/.../services.yaml (which is being imported from "/var/www/.../src/Kernel.php")


At the same time, if you remove the classes associated with gRPC from src / Grpc, then everything works right away.

PS Yes, I know that PHP cannot act as a client for gRPC, I'm interested in the question - somehow you can use Symfony + gRPC + Codeception in one bundle, or Codeception will have to be abandoned, and somehow get by with pure PHPUnit and mocks on all calls to gRPC classes.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question