AccessTest.class.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. /**
  3. * Generated by PHPUnit_SkeletonGenerator on 2013-02-17 at 00:36:52.
  4. */
  5. // exiting because generates fatal error:
  6. // Fatal error: Cannot instantiate abstract class Access in /var/lib/jenkins/jobs/chamilo-lms-1.9/workspace/tests/phpunit/classes/AccessTest.class.php on line 18
  7. //exit;
  8. return;
  9. class AccessTest extends PHPUnit_Framework_TestCase
  10. {
  11. /**
  12. * @var Access
  13. */
  14. protected $object;
  15. /**
  16. * Sets up the fixture, for example, opens a network connection.
  17. * This method is called before a test is executed.
  18. */
  19. protected function setUp()
  20. {
  21. require_once dirname(__FILE__).'/../../../main/inc/global.inc.php';
  22. $this->object = new Access;
  23. }
  24. /**
  25. * Tears down the fixture, for example, closes a network connection.
  26. * This method is called after a test is executed.
  27. */
  28. protected function tearDown()
  29. {
  30. }
  31. /**
  32. * Generated from @assert () !== null.
  33. *
  34. * @covers Access::all
  35. */
  36. public function testAll()
  37. {
  38. $this->assertNotSame(
  39. null,
  40. Access::all()
  41. );
  42. }
  43. /**
  44. * Generated from @assert () === null.
  45. *
  46. * @covers Access::forbidden
  47. */
  48. public function testForbidden()
  49. {
  50. $this->assertSame(
  51. null,
  52. Access::forbidden()
  53. );
  54. }
  55. /**
  56. * Generated from @assert () === false.
  57. *
  58. * @covers Access::is_token_valid
  59. */
  60. public function testIs_token_valid()
  61. {
  62. $this->assertSame(
  63. false,
  64. $this->object->is_token_valid()
  65. );
  66. }
  67. /**
  68. * Generated from @assert () !== null.
  69. *
  70. * @covers Access::get_session_token
  71. */
  72. public function testGet_session_token()
  73. {
  74. $this->assertNotSame(
  75. null,
  76. $this->object->get_session_token()
  77. );
  78. }
  79. /**
  80. * Generated from @assert () === false.
  81. *
  82. * @covers Access::authorize
  83. */
  84. public function testAuthorize()
  85. {
  86. $this->assertSame(
  87. false,
  88. $this->object->authorize()
  89. );
  90. }
  91. /**
  92. * @covers Access::get_token
  93. * @todo Implement testGet_token().
  94. */
  95. public function testGet_token()
  96. {
  97. // Remove the following lines when you implement this test.
  98. $this->markTestIncomplete(
  99. 'This test has not been implemented yet.'
  100. );
  101. }
  102. }