Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
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 a9edfc4 + 5cf0b92 commit ca5e073
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
4 changes: 0 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<php>
<server name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<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,9 +7,11 @@
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;

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

parent::setUp();
}

/** {@inheritDoc} */
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,8 +2,10 @@

namespace Orchestra\Testbench\Tests\Integrations;

use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\TestCase;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class EncryptionTest extends TestCase
{
/**
Expand Down
8 changes: 8 additions & 0 deletions tests/Integrations/PhpUnit9DeprecationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Orchestra\Testbench\Tests\Integrations;

use ErrorException;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Exceptions\DeprecatedException;
use Orchestra\Testbench\TestCase;

Expand All @@ -11,8 +12,15 @@
*
* @requires PHPUnit < 10
*/
#[WithConfig('ray.send_deprecated_notices_to_ray', false)]
class PhpUnit9DeprecationsTest extends TestCase
{
/** {@inheritDoc} */
public function ignorePackageDiscoveriesFrom()
{
return ['*', 'spatie/laravel-ray'];
}

/**
* @test
*
Expand Down
2 changes: 2 additions & 0 deletions tests/Integrations/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace Orchestra\Testbench\Tests\Integrations;

use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\TestCase;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class RequestTest extends TestCase
{
/**
Expand Down
2 changes: 2 additions & 0 deletions tests/Workbench/DiscoversTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
use Composer\InstalledVersions;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
use Orchestra\Testbench\Attributes\WithConfig;
use Orchestra\Testbench\Concerns\WithWorkbench;
use Orchestra\Testbench\TestCase;

#[WithConfig('app.key', 'AckfSECXIvnK5r28GVIWUAxmbBSjTsmF')]
class DiscoversTest extends TestCase
{
use InteractsWithViews;
Expand Down

0 comments on commit ca5e073

Please sign in to comment.