DataCollector example

->method('indices')
            ->willReturn(['indices' => ['index1' => ['status' => 'green'], 'index2' => ['status' => 'green']]]);

        $client
            ->method('cluster')
            ->willReturn($clusterMock);

        $client
            ->method('cat')
            ->willReturn($catMock);

        $collector = new DataCollector(
            true,
            true,
            $client,
            $client
        );

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

        $collector->collect(
            new Request(),
            new Response()
        );
Home | Imprint | This part of the site doesn't use cookies.