Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <?php
  2. require_once 'ControllerTestCase.php';
  3. require_once 'App/Rpc.php';
  4. require_once 'App/Rpc/Proxy.php';
  5.  
  6. class ApplicationsControllerTests extends ControllerTestCase
  7. {
  8. public function testShowAction()
  9. {
  10. $session = new \App_Session();
  11. $session->activeList = array('total_count' => 2, 'applications' => array(100049853));
  12. $this->dispatch('/applications/100049853/?loginuser=p250211_1&loginpass=strange!');
  13. $this->assertController('applications');
  14. $this->assertAction('show');
  15. $this->assertQueryCount('#applicationDetail', 1);
  16. }
  17. public function testChangeTermsAction()
  18. {
  19. $this->_helperFixture->setPath(dirname(__FILE__));
  20. $this->_helperFixture->cleanUp();
  21. $this->_helperFixture->recordFixtures('ApplicationsControllerTest');
  22. // $this->_helperFixture->useFixtures('AtsControllerTest');
  23. $this->request
  24. ->setMethod('POST')
  25. ->setPost(array(
  26. 'submitAction' => 'changeTermsDialogSubmit',
  27. 'message' => 'text',
  28. 'rate' => '15',
  29. ));
  30. $this->dispatch('/applications/100049853/?loginuser=p250211_1&loginpass=strange!');
  31. $this->assertController('applications');
  32. $this->assertAction('show');
  33. $this->assertQueryContentContains('#page_loading', 'Terms Changed');
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement