test.php 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * This is the template for generating the functional test for controller.
  4. * The following variables are available in this template:
  5. * - $controllerID: the controller ID
  6. * - $fixtureName: the fixture name
  7. * - $modelClass: the model class name
  8. */
  9. ?>
  10. <?php echo "<?php\n"; ?>
  11. class <?php echo $modelClass; ?>Test extends WebTestCase
  12. {
  13. public $fixtures=array(
  14. '<?php echo $fixtureName; ?>'=>'<?php echo $modelClass; ?>',
  15. );
  16. public function testShow()
  17. {
  18. $this->open('?r=<?php echo $controllerID; ?>/view&id=1');
  19. }
  20. public function testCreate()
  21. {
  22. $this->open('?r=<?php echo $controllerID; ?>/create');
  23. }
  24. public function testUpdate()
  25. {
  26. $this->open('?r=<?php echo $controllerID; ?>/update&id=1');
  27. }
  28. public function testDelete()
  29. {
  30. $this->open('?r=<?php echo $controllerID; ?>/view&id=1');
  31. }
  32. public function testList()
  33. {
  34. $this->open('?r=<?php echo $controllerID; ?>/index');
  35. }
  36. public function testAdmin()
  37. {
  38. $this->open('?r=<?php echo $controllerID; ?>/admin');
  39. }
  40. }