Skip to content

Commit

Permalink
Merge pull request #1 from phphacks/OV-348
Browse files Browse the repository at this point in the history
Adicionado erro 409
  • Loading branch information
fernandoscolari committed Oct 24, 2018
2 parents be13ded + bf0480f commit 56fc0d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/Exceptions/HttpConflictErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Zend\HttpErrors\Exceptions;

use Zend\HttpErrors\Exceptions\Base\HttpErrorException;

class HttpConflictErrorException extends HttpErrorException
{
const HTTP_ERROR_CODE = 409;
const HTTP_REASON_PHRASE = 'Conflict';
}
4 changes: 3 additions & 1 deletion tests/Factory/ResponseFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Zend\HttpErrors\Exceptions\Base\HttpErrorException;
use Zend\HttpErrors\Exceptions\HttpBadRequestException;
use Zend\HttpErrors\Exceptions\HttpConflictErrorException;
use Zend\HttpErrors\Exceptions\HttpForbiddenException;
use Zend\HttpErrors\Exceptions\HttpInternalServerErrorException;
use Zend\HttpErrors\Exceptions\HttpMethodNotAllowedException;
Expand Down Expand Up @@ -47,7 +48,8 @@ public function setUp()
new HttpNotImplementedException(),
new HttpInternalServerErrorException(),
new HttpServiceUnavailableException(),
new HttpPaymentRequiredException()
new HttpPaymentRequiredException(),
new HttpConflictErrorException()
];

parent::setUp();
Expand Down

0 comments on commit 56fc0d1

Please sign in to comment.