Actions

Source Code of This Project

/test/functional/frontend/sourceActionsTest.php

<?php
/*
 * This file is part of the pwp package.
 * (c) 2009-2010 Victor Rad' <victor.v.rad[at]gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new sfTestFunctional(new sfBrowser());

$browser->
  get('/source')->

  with('request')->begin()->
    isParameter('module', 'source')->
    isParameter('action', 'index')->
  end()->

  with('response')->begin()->
    isStatusCode(200)->
    checkElement('.sources h3', '/doc/UML/DBuilder.png')->
  end()->

  click('Download')->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('Content-Type', 'application/zip')->
  end()

;