HttpCodeTest.php 552 B

12345678910111213141516171819
  1. <?php
  2. namespace Codeception\Util;
  3. class HttpCodeTest extends \Codeception\Test\Unit
  4. {
  5. public function testHttpCodeConstants()
  6. {
  7. $this->assertEquals(200, HttpCode::OK);
  8. $this->assertEquals(404, HttpCode::NOT_FOUND);
  9. }
  10. public function testHttpCodeWithDescription()
  11. {
  12. $this->assertEquals('200 (OK)', HttpCode::getDescription(200));
  13. $this->assertEquals('301 (Moved Permanently)', HttpCode::getDescription(301));
  14. $this->assertEquals('401 (Unauthorized)', HttpCode::getDescription(401));
  15. }
  16. }