Skip to content

Commit

Permalink
Merge pull request #10 from Laminas-Commons/develop
Browse files Browse the repository at this point in the history
Updated dependencies
  • Loading branch information
visto9259 committed Sep 7, 2020
2 parents b2af0a4 + 05c563a commit be9f98d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ env:
matrix:
fast_finish: true
include:
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=latest
- TEST_COVERAGE=true
- php: 7.2
env:
- DEPS=lowest
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"require": {
"php": "^7.1",
"php": "^7.2",
"laminas/laminas-eventmanager": "^2.6.4 || ^3.2.1",
"laminas/laminas-http": "^2.10",
"laminas/laminas-mvc": "^2.7.15 || ^3.1.1",
Expand All @@ -45,7 +45,7 @@
"laminas/laminas-modulemanager": "^2.7.2",
"laminas/laminas-serializer": "^2.8",
"laminas/laminas-view": "^2.8.1",
"phpunit/phpunit": "^7.5.18 || ^8.5.1",
"phpunit/phpunit": "^8.5.1",
"php-coveralls/php-coveralls": "^2.1",
"squizlabs/php_codesniffer": "^3.4"
},
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/LmcCorsTest/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public function testAssertListenerIsCorrectlyRegistered()
{
$module = new Module();
$mvcEvent = $this->getMockBuilder('Laminas\Mvc\MvcEvent')->getMock();
$application = $this->getMockBuilder('Laminas\Mvc\Application', [], [], '', false)
$application = $this->getMockBuilder('Laminas\Mvc\Application')
->disableOriginalConstructor()
->getMock();
$eventManager = $this->getMockBuilder('Laminas\EventManager\EventManagerInterface')->getMock();
$serviceManager = $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->getMock();
$corsListener = $this->getMockBuilder('LmcCors\Mvc\CorsRequestListener', [], [], '', false)
$corsListener = $this->getMockBuilder('LmcCors\Mvc\CorsRequestListener')
->disableOriginalConstructor()
->getMock();

Expand Down
8 changes: 5 additions & 3 deletions tests/LmcCorsTest/Service/CorsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

namespace LmcCorsTest\Service;

use LmcCors\Exception\DisallowedOriginException;
use LmcCors\Exception\InvalidOriginException;
use PHPUnit\Framework\TestCase as TestCase;
use Laminas\Http\Response as HttpResponse;
use Laminas\Http\Request as HttpRequest;
Expand Down Expand Up @@ -289,7 +291,7 @@ public function testRefuseNormalCorsRequestIfUnauthorized()

$request->getHeaders()->addHeaderLine('Origin', 'http://unauthorized.com');

$this->expectException(\LmcCors\Exception\DisallowedOriginException::class);
$this->expectException(DisallowedOriginException::class);
$this->expectExceptionMessage('The origin "http://unauthorized.com" is not authorized');

$this->corsService->populateCorsResponse($request, $response);
Expand Down Expand Up @@ -424,7 +426,7 @@ public function testDoesNotCrashApplicationOnInvalidOriginValue()
$request = new HttpRequest();
$request->setUri('https://example.com');
$request->getHeaders()->addHeaderLine('Origin', 'file:');
$this->expectException(\LmcCors\Exception\InvalidOriginException::class);
$this->expectException(InvalidOriginException::class);
$this->corsService->isCorsRequest($request);
}

Expand Down Expand Up @@ -472,7 +474,7 @@ public function testCanPopulateNormalCorsRequestWithRouteMatchRewriteException()

$request->getHeaders()->addHeaderLine('Origin', 'http://example.com');

$this->expectException(\LmcCors\Exception\DisallowedOriginException::class);
$this->expectException(DisallowedOriginException::class);
$this->corsService->populateCorsResponse($request, $response, $routeMatch);
}
}

0 comments on commit be9f98d

Please sign in to comment.