-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPUnit 10 Shift #155
PHPUnit 10 Shift #155
Changes from all commits
68fb71e
9455307
2d4a755
f94a139
9ad19e6
3ce9bd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/vendor | ||
composer.lock | ||
.phpunit.result.cache | ||
/.phpunit.cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<?php | ||
|
||
class AvatarLaravelTest extends \PHPUnit\Framework\TestCase | ||
use PHPUnit\Framework\Attributes\Test; | ||
|
||
final class AvatarLaravelTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function it_can_override_attributes_when_instantiated() | ||
#[Test] | ||
public function it_can_override_attributes_when_instantiated(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method name |
||
{ | ||
$config = [ | ||
'ascii' => false, | ||
|
@@ -43,10 +43,8 @@ public function it_can_override_attributes_when_instantiated() | |
$this->assertEquals(false, $avatar->getAttribute('ascii')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_have_no_border_radius_as_default() | ||
#[Test] | ||
public function it_have_no_border_radius_as_default(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method name |
||
{ | ||
$config = [ | ||
'border' => ['size' => 1, 'color' => '#999999'], | ||
|
@@ -64,10 +62,8 @@ public function it_have_no_border_radius_as_default() | |
$this->assertEquals(0, $avatar->getAttribute('borderRadius')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_can_override_attributes_after_set_name() | ||
#[Test] | ||
public function it_can_override_attributes_after_set_name(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method name |
||
{ | ||
$cache = Mockery::mock('Illuminate\Contracts\Cache\Repository'); | ||
$generator = Mockery::mock('Laravolt\Avatar\InitialGenerator'); | ||
|
@@ -85,10 +81,8 @@ public function it_can_override_attributes_after_set_name() | |
$this->assertEquals('#FFFFFF', $avatar->getAttribute('foreground')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_has_correct_random_background() | ||
#[Test] | ||
public function it_has_correct_random_background(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method name |
||
{ | ||
$config = [ | ||
'foregrounds' => ['#000000', '#111111'], | ||
|
@@ -115,10 +109,8 @@ public function it_has_correct_random_background() | |
$this->assertEquals('#111111', $avatar->getAttribute('foreground')); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_has_different_random_background() | ||
#[Test] | ||
public function it_has_different_random_background(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method name |
||
{ | ||
$config = [ | ||
'backgrounds' => ['#000000', '#111111'], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each class must be in a namespace of at least one level (a top-level vendor name)