public function testMaster() { $result = $this->catRepository->master(); $data = $result->getData()->getGatewayValue(); $this->assertCount(1, $data); $this->assertGreaterThanOrEqual(3, strlen($data[0]['node'])); }
public function testMaster() { $return = 'itsMe'; $type = null; $className = 'myClassName'; $request = $this->getMockBuilder('Elastification\\Client\\Request\\RequestInterface')->disableOriginalConstructor()->getMock(); $this->requestRepositoryFactory->expects($this->once())->method('create')->with($this->equalTo($className), $this->equalTo(null), $this->equalTo(null), $this->equalTo($this->serializer))->willReturn($request); $this->repositoryClassMap->expects($this->once())->method('getClassName')->with(CatRepositoryInterface::CAT_MASTER)->willReturn($className); $this->client->expects($this->once())->method('send')->willReturn($return); $result = $this->indexRepository->master(); $this->assertSame($return, $result); }