Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 6, 2024
2 parents ae6dadb + ca5e073 commit ffc3717
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
6 changes: 0 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<php>
<server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<server name="CACHE_STORE" value="array"/>
<server name="SESSION_DRIVER" value="array"/>
<server name="SEND_DEPRECATED_NOTICES_TO_RAY" value="(true)"/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
Expand Down
2 changes: 2 additions & 0 deletions tests/DefaultConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
use DateTimeInterface;
use Illuminate\Foundation\Bootstrap\LoadConfiguration;
use Illuminate\Support\Facades\Date;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Foundation\Env;
use Orchestra\Testbench\TestCase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class DefaultConfigurationTest extends TestCase
{
#[Test]
Expand Down
18 changes: 18 additions & 0 deletions tests/Foundation/EnvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@
#[Group('phpunit-configuration')]
class EnvTest extends TestCase
{
/** {@inheritDoc} */
#[\Override]
protected function setUp(): void
{
$_ENV['APP_KEY'] = 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF';

parent::setUp();
}

/** {@inheritDoc} */
#[\Override]
protected function tearDown(): void
{
unset($_ENV['APP_KEY']);

parent::tearDown();
}

#[Test]
public function it_can_determined_has_env_values()
{
Expand Down
2 changes: 2 additions & 0 deletions tests/Integrations/EncryptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace Orchestra\Testbench\Tests\Integrations;

use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\TestCase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class EncryptionTest extends TestCase
{
#[Test]
Expand Down
2 changes: 2 additions & 0 deletions tests/Integrations/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

use Exception;
use Illuminate\Routing\Router;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\TestCase;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\Test;
use Workbench\App\Http\Controllers\ExampleController;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class RouteTest extends TestCase
{
/** {@inheritDoc} */
Expand Down

0 comments on commit ffc3717

Please sign in to comment.