Skip to content

Commit f6d23b9

Browse files
committed
Fix hashes for new namespace
1 parent eda6b1d commit f6d23b9

File tree

7 files changed

+31
-23
lines changed

7 files changed

+31
-23
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ bootstrap/cache/packages.php
99
bootstrap/cache/services.php
1010

1111
docs/*.blade.php
12-
docs/**/*.blade.php
12+
docs/**/*.blade.php
13+
.phpunit.cache/test-results

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^8.1",
14-
"illuminate/support": "^10.0|^11.0|^12.0",
14+
"illuminate/support": "^11",
1515
"illuminate/filesystem": "^10.0|^11.0|^12.0",
1616
"illuminate/console": "^10.0|^11.0|^12.0"
1717
},

tests/Commands/DebugCommandTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use AaronFrancis\Airdrop\Tests\BaseTest;
1010
use AaronFrancis\Airdrop\Triggers\ConfigTrigger;
1111
use AaronFrancis\Airdrop\Triggers\FileTrigger;
12+
use PHPUnit\Framework\Attributes\Test;
1213

1314
class DebugCommandTest extends BaseTest
1415
{
@@ -27,7 +28,7 @@ public function getEnvironmentSetUp($app)
2728
]);
2829
}
2930

30-
/** @test */
31+
#[Test]
3132
public function test_all_triggers_output()
3233
{
3334
$expected = <<<EOT
@@ -46,7 +47,7 @@ public function test_all_triggers_output()
4647
->assertExitCode(0);
4748
}
4849

49-
/** @test */
50+
#[Test]
5051
public function test_single_trigger()
5152
{
5253
$expected = <<<EOT

tests/Commands/HashCommandTest.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66

77
namespace AaronFrancis\Airdrop\Tests\Commands;
88

9+
use AaronFrancis\Airdrop\HashGenerator;
910
use AaronFrancis\Airdrop\Tests\BaseTest;
1011
use AaronFrancis\Airdrop\Triggers\ConfigTrigger;
1112
use AaronFrancis\Airdrop\Triggers\FileTrigger;
13+
use PHPUnit\Framework\Attributes\Test;
1214

1315
class HashCommandTest extends BaseTest
1416
{
@@ -27,31 +29,31 @@ public function getEnvironmentSetUp($app)
2729
]);
2830
}
2931

30-
/** @test */
32+
#[Test]
3133
public function test_all_triggers_output()
3234
{
3335
$this->artisan('airdrop:hash')
34-
->expectsOutput('acf41088634d35afb8351a0839745f2a')
36+
->expectsOutput('52b0daab48aded4aab3fc7e03af2d128')
3537
->assertExitCode(0);
3638
}
3739

38-
/** @test */
40+
#[Test]
3941
public function test_all_triggers_output_w_prefix()
4042
{
4143
$this->artisan('airdrop:hash --prefix=foobar-')
42-
->expectsOutput('foobar-acf41088634d35afb8351a0839745f2a')
44+
->expectsOutput('foobar-52b0daab48aded4aab3fc7e03af2d128')
4345
->assertExitCode(0);
4446
}
4547

46-
/** @test */
48+
#[Test]
4749
public function test_all_triggers_output_set_env()
4850
{
4951
$this->assertEquals('', getenv('AIRDROP_HASH'));
5052

5153
$this->artisan('airdrop:hash --prefix=foobar- --putenv=AIRDROP_HASH')
52-
->expectsOutput('foobar-acf41088634d35afb8351a0839745f2a')
54+
->expectsOutput('foobar-52b0daab48aded4aab3fc7e03af2d128')
5355
->assertExitCode(0);
5456

55-
$this->assertEquals('foobar-acf41088634d35afb8351a0839745f2a', getenv('AIRDROP_HASH'));
57+
$this->assertEquals('foobar-52b0daab48aded4aab3fc7e03af2d128', getenv('AIRDROP_HASH'));
5658
}
5759
}

tests/Drivers/FileSystemDriverTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
namespace AaronFrancis\Airdrop\Tests\Drivers;
88

99
use AaronFrancis\Airdrop\Concerns\MakesDrivers;
10+
use AaronFrancis\Airdrop\HashGenerator;
1011
use AaronFrancis\Airdrop\Tests\BaseTest;
1112
use AaronFrancis\Airdrop\Triggers\FileTrigger;
1213
use Illuminate\Support\Facades\File;
1314
use Illuminate\Support\Facades\Storage;
15+
use PHPUnit\Framework\Attributes\Test;
1416

1517
class FileSystemDriverTest extends BaseTest
1618
{
@@ -34,17 +36,17 @@ public function getEnvironmentSetUp($app)
3436
]);
3537
}
3638

37-
/** @test */
39+
#[Test]
3840
public function it_creates_and_uploads_a_zip()
3941
{
4042
Storage::fake('s3');
4143

4244
$this->artisan('airdrop:upload');
4345

44-
Storage::disk('s3')->assertExists('airdrop/airdrop-36eda7109ca99a5fb55cffefeca3c554.zip');
46+
Storage::disk('s3')->assertExists('airdrop/airdrop-0cf3788c521e4652ad2ad39ffd7974ec.zip');
4547
}
4648

47-
/** @test */
49+
#[Test]
4850
public function names_get_excluded()
4951
{
5052
Storage::fake('s3');
@@ -63,7 +65,7 @@ public function names_get_excluded()
6365
$this->assertStringEndsWith('css/app.css', $files[0]);
6466
}
6567

66-
/** @test */
68+
#[Test]
6769
public function it_downloads_and_restores()
6870
{
6971
$this->artisan('airdrop:upload');

tests/HashCalculationTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
use AaronFrancis\Airdrop\HashGenerator;
1010
use AaronFrancis\Airdrop\Triggers\ConfigTrigger;
1111
use AaronFrancis\Airdrop\Triggers\FileTrigger;
12+
use PHPUnit\Framework\Attributes\Test;
1213

1314
class HashCalculationTest extends BaseTest
1415
{
15-
/** @test */
16+
#[Test]
1617
public function it_tests_basic_file_hash()
1718
{
1819
config()->set('airdrop.triggers', [
@@ -33,10 +34,10 @@ public function it_tests_basic_file_hash()
3334

3435
$hash = (new HashGenerator)->generate();
3536

36-
$this->assertEquals('36eda7109ca99a5fb55cffefeca3c554', $hash);
37+
$this->assertEquals('0cf3788c521e4652ad2ad39ffd7974ec', $hash);
3738
}
3839

39-
/** @test */
40+
#[Test]
4041
public function it_gets_sorted()
4142
{
4243
config()->set('airdrop.triggers', [

tests/Triggers/InputFilesTriggerTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
use AaronFrancis\Airdrop\Tests\BaseTest;
1010
use AaronFrancis\Airdrop\Triggers\FileTrigger;
11+
use PHPUnit\Framework\Attributes\Test;
1112

1213
class InputFilesTriggerTest extends BaseTest
1314
{
14-
/** @test */
15+
#[Test]
1516
public function the_hashes_are_stable()
1617
{
1718
$config = [
@@ -25,7 +26,7 @@ public function the_hashes_are_stable()
2526
$this->assertEquals('62f6d1bfc836a1536c4869fe8f78249b', array_values($hashes)[0]);
2627
}
2728

28-
/** @test */
29+
#[Test]
2930
public function different_files_give_different_hashes()
3031
{
3132
$config = [
@@ -39,7 +40,7 @@ public function different_files_give_different_hashes()
3940
$this->assertEquals('b8f3f6ee7bc704b0433540bb322423f0', array_values($hashes)[0]);
4041
}
4142

42-
/** @test */
43+
#[Test]
4344
public function multiple_files_get_hashed()
4445
{
4546
$config = [
@@ -55,7 +56,7 @@ public function multiple_files_get_hashed()
5556
$this->assertEquals('b8f3f6ee7bc704b0433540bb322423f0', array_values($hashes)[1]);
5657
}
5758

58-
/** @test */
59+
#[Test]
5960
public function files_get_excluded()
6061
{
6162
$config = [
@@ -74,7 +75,7 @@ public function files_get_excluded()
7475
$this->assertEquals('62f6d1bfc836a1536c4869fe8f78249b', array_values($hashes)[0]);
7576
}
7677

77-
/** @test */
78+
#[Test]
7879
public function globs_get_excluded()
7980
{
8081
$config = [

0 commit comments

Comments
 (0)