Skip to content

Commit

Permalink
fixing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-blom committed Nov 3, 2022
1 parent 7249d72 commit c407124
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
throw new RuntimeException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
} else {
// load all the .env files
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
(new Dotenv())->loadEnv(dirname(__DIR__).'/.env');
}

$_SERVER += $_ENV;
Expand Down
3 changes: 2 additions & 1 deletion config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ framework:
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: ~
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native

#esi: true
#fragments: true
Expand Down
2 changes: 1 addition & 1 deletion migrations/Version20190721184250.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Migrations;
namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Controller/UriControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testGetTokenFromRequestHeader(): void
/** @var string $token */
$token = $method->invoke(new UriController(), $request);

$this->assertInternalType('string', $token);
$this->assertIsString('string', $token);
$this->assertSame('foobar', $token);


Expand All @@ -59,7 +59,7 @@ public function testGetTokenFromRequestHeader(): void
/** @var string $token */
$token = $method->invoke(new UriController(), $request);

$this->assertInternalType('string', $token);
$this->assertIsString('string', $token);
$this->assertSame('123', $token);
}
}
4 changes: 2 additions & 2 deletions tests/Unit/Repository/UriRepositoryTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace App\Tests\Unit\Service;
namespace App\Tests\Unit\Repository;

use App\Entity\Uri;
use App\Repository\UriRepository;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\ORMException;
use Doctrine\ORM\Exception\ORMException;
use PHPUnit\Framework\TestCase;

class UriRepositoryTest extends TestCase
Expand Down

0 comments on commit c407124

Please sign in to comment.