Bolt\Tests\Controller\Backend\ExtendTest::testInstallInfo PHP Метод

testInstallInfo() публичный Метод

public testInstallInfo ( )
    public function testInstallInfo()
    {
        $this->getApp()->flush();
        $mockInfo = $this->getMockBuilder(QueryService::class)->setMethods(['info'])->setConstructorArgs([$this->getApp()])->setMockClassName('MockInfoService')->disableOriginalConstructor()->getMock();
        $mockInfo->expects($this->once())->method('info')->will($this->returnValue($this->packageInfoProvider()));
        $this->setService('extend.info', $mockInfo);
        $this->allowLogin($this->getApp());
        $this->setRequest(Request::create('/bolt/extend/installInfo?package=test&bolt=2.0.0'));
        $response = $this->controller()->installInfo($this->getRequest());
        $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());
        $parsedOutput = json_decode($response->getContent());
        $this->assertNotEmpty($parsedOutput->dev);
        $this->assertNotEmpty($parsedOutput->stable);
    }