Skip to content

Commit

Permalink
[11.x] Test Improvements (#52718)
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Sep 10, 2024
1 parent 15cf063 commit 9fdf85c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
17 changes: 5 additions & 12 deletions tests/Bus/QueueableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Illuminate\Tests\Bus;

use Illuminate\Bus\Queueable;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

class QueueableTest extends TestCase
Expand All @@ -17,9 +18,7 @@ public static function connectionDataProvider(): array
];
}

/**
* @dataProvider connectionDataProvider
*/
#[DataProvider('connectionDataProvider')]
public function testOnConnection(mixed $connection, ?string $expected): void
{
$job = new FakeJob();
Expand All @@ -28,9 +27,7 @@ public function testOnConnection(mixed $connection, ?string $expected): void
$this->assertSame($job->connection, $expected);
}

/**
* @dataProvider connectionDataProvider
*/
#[DataProvider('connectionDataProvider')]
public function testAllOnConnection(mixed $connection, ?string $expected): void
{
$job = new FakeJob();
Expand All @@ -50,9 +47,7 @@ public static function queuesDataProvider(): array
];
}

/**
* @dataProvider queuesDataProvider
*/
#[DataProvider('queuesDataProvider')]
public function testOnQueue(mixed $queue, ?string $expected): void
{
$job = new FakeJob();
Expand All @@ -61,9 +56,7 @@ public function testOnQueue(mixed $queue, ?string $expected): void
$this->assertSame($job->queue, $expected);
}

/**
* @dataProvider queuesDataProvider
*/
#[DataProvider('queuesDataProvider')]
public function testAllOnQueue(mixed $queue, ?string $expected): void
{
$job = new FakeJob();
Expand Down
6 changes: 0 additions & 6 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2003,9 +2003,6 @@ public function testSortByMany($collection)
}

#[DataProvider('collectionClassProvider')]
/**
* @dataProvider collectionClassProvider
*/
public function testNaturalSortByManyWithNull($collection)
{
$itemFoo = new \stdClass();
Expand All @@ -2026,9 +2023,6 @@ public function testNaturalSortByManyWithNull($collection)
}

#[DataProvider('collectionClassProvider')]
/**
* @dataProvider collectionClassProvider
*/
public function testSortKeys($collection)
{
$data = new $collection(['b' => 'dayle', 'a' => 'taylor']);
Expand Down

0 comments on commit 9fdf85c

Please sign in to comment.