Skip to content

Use KernelEvents for TurnOn and TurnOff recodings #7

Open
@monobook

Description

@monobook

Hi. I've got idea about testing Behat scenarios with php-vcr...

Why should we put logic in AppKernel.php like this and in app_test.php like this? Maybe use Kernel Events for this?

  1. On KernelEvents::REQUEST with high priority we do all what we do on AppKernel.php
  2. On KernelEvents::TERMINATE with lowest priority we "eject" cassette and "stop recording"

Conclusions:

  1. we have clean AppKernel.php
  2. we could change dynamic behavior via EventSubscriber logic.

PS: Maybe It would be nice to create Extension for Behat?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions