As explained elsewhere (Take a screenshot with Selenium WebDriver), you can take screenshots easily with PHPUnit using the Selenium Webdriver class PHPUnit_Extensions_Selenium2TestCase .
However, I cannot find a way to set the screen size of the generated screenshots. By default, their width seems to be limited to 1000 pixels.
BTW: the above mentioned Stackoverflow thread is closed. So I cannot post my question there.
$this->currentWindow()->size()
does affect the screenshot, but the size of the browser window itself.