Aimeos\ShopBundle\Tests\Controller\ExtadmControllerTest::testDo PHP Метод

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

public testDo ( )
    public function testDo()
    {
        $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'adminpass'));
        $token = $client->getContainer()->get('security.csrf.token_manager')->getToken('aimeos_admin_token');
        $client->request('POST', '/unittest/extadm/do?_token=' . $token->getValue(), array(), array(), array('CONTENT_TYPE' => 'application/json'), '[{"jsonrpc":"2.0","method":"Product_Type.searchItems","params":{"site":"unittest"},"id":2}]');
        $this->assertEquals(200, $client->getResponse()->getStatusCode());
        $this->assertStringStartsWith('[{', $client->getResponse()->getContent());
    }