TraceableValueResolver example

use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Stopwatch\Stopwatch;

class TraceableValueResolverTest extends TestCase
{
    /** * @group legacy */
    public function testTimingsInSupports()
    {
        $stopwatch = new Stopwatch();
        $resolver = new TraceableValueResolver(new ResolverStub()$stopwatch);
        $argument = new ArgumentMetadata('dummy', 'string', false, false, null);
        $request = new Request();

        $this->assertTrue($resolver->supports($request$argument));

        $event = $stopwatch->getEvent(ResolverStub::class.'::supports');
        $this->assertCount(1, $event->getPeriods());
    }

    public function testTimingsInResolve()
    {
        
Home | Imprint | This part of the site doesn't use cookies.