# UserQueryControllerTest

Extends \NPS\Test\ControllerTestCase

Tests user query controller

author | Lukas Korinek
package | Default

### Methods

## Signs the client in

    auth(boolean $admin = false)

inherited

### Arguments

#### $admin

`boolean`

Whether to use the admin role

## Executes a command with parameters

    cmd(string $cmd)

inherited static

### Arguments

#### $cmd

`string`

Command to execute

## Extracts error information from the response

    err() : string|null

inherited

### Response

`string|null`

## Creates or returns the testing client

    getClient() : \Symfony\Component\BrowserKit\Client

inherited static

### Response

`\Symfony\Component\BrowserKit\Client`

## Will return last response's json content

    json() : array|null

inherited

### Response

`array|null`

## Peeks a client's db in order to fetch important test data

    peekDB(string $entity) : object

inherited

### Arguments

#### $entity

`string`

Entity to fetch

### Response

`object`

## Performs a request

    request(string $url, string $method = 'GET', array $params = array(),  $files = array()) : integer

inherited

### Arguments

#### $url

`string`

#### $method

`string`

#### $params

`array`

#### $files

``

### Response

`integer`

Status code of the response

## setUp

    setUp()

inherited

inheritDoc |

## setUpBeforeClass

    setUpBeforeClass()

inherited static

inheritDoc |

## tearDown

    tearDown()

inherited

inheritDoc |

## tearDownAfterClass

    tearDownAfterClass()

inherited static

inheritDoc |

## testListQuestionsAction

    testListQuestionsAction()

## testListReportedErrorsAction

    testListReportedErrorsAction()

## testQuestionAction

    testQuestionAction()

## testReportErrorAction

    testReportErrorAction()

## Gets the text content of a response

    text() : string|null

inherited

### Response

`string|null`

### Properties

## application

    application : \Symfony\Bundle\FrameworkBundle\Console\Application

inherited static

var |

### Type(s)

`\Symfony\Bundle\FrameworkBundle\Console\Application`

## conn

    conn : \Doctrine\DBAL\Connection

inherited

var |

### Type(s)

`\Doctrine\DBAL\Connection`

## response

    response : \Symfony\Component\HttpFoundation\Response

inherited

var |

### Type(s)

`\Symfony\Component\HttpFoundation\Response`

## json

    json : array

inherited

var |

### Type(s)

`array`

## client

    client : \Symfony\Component\BrowserKit\Client

inherited static

var |

### Type(s)

`\Symfony\Component\BrowserKit\Client`