Skip to content

Commit

Permalink
phpunit config
Browse files Browse the repository at this point in the history
  • Loading branch information
joanfabregat committed Dec 11, 2024
1 parent 43cb479 commit 6454c1d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.idea
/vendor
.DS_Store
/.env.test
/.env.test
/.phpunit.cache
28 changes: 28 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2024 Code Inc. - All Rights Reserved
~ Unauthorized copying of this file, via any medium is strictly prohibited
~ Proprietary and confidential
~ Visit <https://www.codeinc.co> for more information
-->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
cacheDirectory=".phpunit.cache">

<!-- Test Suites -->
<testsuites>
<testsuite name="Unit Tests">
<directory>tests</directory>
</testsuite>
</testsuites>

<!-- PHP Configuration -->
<php>
<!-- Other PHP settings -->
<ini name="error_reporting" value="E_ALL"/>
<ini name="display_errors" value="1"/>
<ini name="memory_limit" value="512M"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

// Load .env file
if (file_exists(__DIR__.'/../.env.test')) {
Dotenv\Dotenv::createImmutable([__DIR__])->load();
Dotenv\Dotenv::createImmutable(__DIR__.'/..', '.env.test')->load();
}

0 comments on commit 6454c1d

Please sign in to comment.