Skip to content

Commit

Permalink
Add testing requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphjsmit committed Sep 22, 2021
1 parent 77e0bda commit 9a51fba
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@
"RalphJSmit\\LaravelHorizonCron\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"RalphJSmit\\LaravelHorizonCron\\": "tests"
}
},
"require-dev": {
"orchestra/testbench": "^6.0"
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.5"
},
"extra": {
"laravel": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

33 changes: 33 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<php>
<env name="DB_CONNECTION" value="testing"/>
<env name="APP_KEY" value="base64:2fl+Ktvkfl+Fuz4Qp/A75G2RTiWVA/j3nYmd8fiiM10="/>
</php>
</phpunit>
26 changes: 26 additions & 0 deletions tests/Supervisor/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace RalphJSmit\LaravelHorizonCron\Supervisor\Tests;

use RalphJSmit\LaravelHorizonCron\SupervisorServiceProvider;

class TestCase extends \Orchestra\Testbench\TestCase
{
public function setUp(): void
{
parent::setUp();
// additional setup
}

protected function getPackageProviders($app)
{
return [
SupervisorServiceProvider::class,
];
}

protected function getEnvironmentSetUp($app)
{
// perform environment setup
}
}
1 change: 1 addition & 0 deletions vendor

0 comments on commit 9a51fba

Please sign in to comment.