getClusterInfo example

static::assertSame('elasticsearch', $collector->getName());

        $collector->collect(
            new Request(),
            new Response()
        );

        static::assertEquals(600, $collector->getTime());
        static::assertEquals(3, $collector->getRequestAmount());
        static::assertCount(3, $collector->getRequests());
        static::assertEquals(['status' => 'green']$collector->getClusterInfo());
        static::assertEquals(['indices' => ['index1' => ['status' => 'green'], 'index2' => ['status' => 'green']]]$collector->getIndices());
    }

    public function testReset(): void
    {
        $client = $this->createMock(ClientProfiler::class);
        $client
            ->method('getCalledRequests')
            ->willReturn([
                ['time' => 0.1],
                ['time' => 0.2],
                [
Home | Imprint | This part of the site doesn't use cookies.