Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'ControllerTestCase.php';
- require_once 'App/Rpc.php';
- require_once 'App/Rpc/Proxy.php';
- class ApplicationsControllerTests extends ControllerTestCase
- {
- public function testShowAction()
- {
- $session = new \App_Session();
- $session->activeList = array('total_count' => 2, 'applications' => array(100049853));
- $this->dispatch('/applications/100049853/?loginuser=p250211_1&loginpass=strange!');
- $this->assertController('applications');
- $this->assertAction('show');
- $this->assertQueryCount('#applicationDetail', 1);
- }
- public function testChangeTermsAction()
- {
- $this->_helperFixture->setPath(dirname(__FILE__));
- $this->_helperFixture->cleanUp();
- $this->_helperFixture->recordFixtures('ApplicationsControllerTest');
- // $this->_helperFixture->useFixtures('AtsControllerTest');
- $this->request
- ->setMethod('POST')
- ->setPost(array(
- 'submitAction' => 'changeTermsDialogSubmit',
- 'message' => 'text',
- 'rate' => '15',
- ));
- $this->dispatch('/applications/100049853/?loginuser=p250211_1&loginpass=strange!');
- $this->assertController('applications');
- $this->assertAction('show');
- $this->assertQueryContentContains('#page_loading', 'Terms Changed');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement