Skip to content
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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor
composer.lock
.phpunit.result.cache
/.phpunit.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"require-dev": {
"roave/security-advisories": "dev-latest",
"phpunit/phpunit": "~9.0",
"phpunit/phpunit": "^10.0",
"mockery/mockery": "~1.3",
"php-coveralls/php-coveralls": "^2.1"
},
Expand Down
34 changes: 13 additions & 21 deletions tests/AvatarLaravelTest.php
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

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)

{
/**
* @test
*/
public function it_can_override_attributes_when_instantiated()
#[Test]
public function it_can_override_attributes_when_instantiated(): void

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name AvatarLaravelTest::it_can_override_attributes_when_instantiated is not in camel caps format

{
$config = [
'ascii' => false,
Expand Down Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name AvatarLaravelTest::it_have_no_border_radius_as_default is not in camel caps format

{
$config = [
'border' => ['size' => 1, 'color' => '#999999'],
Expand All @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name AvatarLaravelTest::it_can_override_attributes_after_set_name is not in camel caps format

{
$cache = Mockery::mock('Illuminate\Contracts\Cache\Repository');
$generator = Mockery::mock('Laravolt\Avatar\InitialGenerator');
Expand All @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name AvatarLaravelTest::it_has_correct_random_background is not in camel caps format

{
$config = [
'foregrounds' => ['#000000', '#111111'],
Expand All @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name AvatarLaravelTest::it_has_different_random_background is not in camel caps format

{
$config = [
'backgrounds' => ['#000000', '#111111'],
Expand Down
Loading
Loading