Skip to content

Commit

Permalink
BC Layer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 24, 2024
1 parent 0058ea2 commit 67f6cfe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
5 changes: 5 additions & 0 deletions Tests/Application/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

require $file;


if (!\trait_exists(Prophecy\PhpUnit\ProphecyTrait::class)) { // backwards compatibility layer for < PHP 7.3
require __DIR__ . '/../../prophecy-trait-bc-layer.php';
}

// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__) . '/.env.local.php')) {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/Controller/RedirectRouteImportControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function testImportActionConverterNotFound()
$import->import(Argument::any())->willThrow(ConverterNotFoundException::class);

$controller = new RedirectRouteImportController($import->reveal(), $this->importPath);
$response = $controller->postAction($request->reveal(), $this->importPath);
$response = $controller->postAction($request, $this->importPath);

$this->assertInstanceOf(JsonResponse::class, $response);
$this->assertEquals(400, $response->getStatusCode());
Expand All @@ -122,7 +122,7 @@ public function testImportActionNoFile()
$import->import(Argument::any())->shouldNotBeCalled();

$controller = new RedirectRouteImportController($import->reveal(), $this->importPath);
$response = $controller->postAction($request->reveal(), $this->importPath);
$response = $controller->postAction($request, $this->importPath);

$this->assertInstanceOf(JsonResponse::class, $response);
$this->assertEquals(400, $response->getStatusCode());
Expand Down
19 changes: 0 additions & 19 deletions Tests/prophecy-trailt-bc-layer.php

This file was deleted.

4 changes: 0 additions & 4 deletions Tests/test-bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@
*/

require __DIR__ . '/Application/config/bootstrap.php';

if (!\trait_exists(Prophecy\PhpUnit\ProphecyTrait::class)) { // backwards compatibility layer for < PHP 7.3
require __DIR__ . '/prophecy-trait-bc-layer.php';
}

0 comments on commit 67f6cfe

Please sign in to comment.