diff --git a/tests/BaseTest.php b/tests/BaseTest.php index 88740f3..17fc8be 100644 --- a/tests/BaseTest.php +++ b/tests/BaseTest.php @@ -6,10 +6,8 @@ use Victorlap\Approvable\Tests\Models\UserCanApprove; use Victorlap\Approvable\Tests\Models\UserCannotApprove; - -class BaseTests extends TestCase +class BaseTest extends TestCase { - private function returnUserInstance($model = User::class) { $instance = new $model([ @@ -21,7 +19,8 @@ private function returnUserInstance($model = User::class) return $instance; } - public function testApproverCanCreate() { + public function testApproverCanCreate() + { $user = $this->returnUserInstance(UserCanApprove::class); $user->save(); @@ -29,7 +28,8 @@ public function testApproverCanCreate() { $this->assertTrue($user->exists); } - public function testRegularCanCreate() { + public function testRegularCanCreate() + { $user = $this->returnUserInstance(UserCannotApprove::class); $user->save(); @@ -37,23 +37,25 @@ public function testRegularCanCreate() { $this->assertTrue($user->exists); } - public function testApproverCanEdit() { + public function testApproverCanEdit() + { $user = $this->returnUserInstance(UserCanApprove::class); $user->save(); $user->name = 'Doe John'; $user->save(); - $this->assertEquals('Doe John', $user->fresh()->name); + $this->assertEquals('Doe John', $user->fresh()->name); } - public function testRegularCannotEdit() { + public function testRegularCannotEdit() + { $user = $this->returnUserInstance(UserCannotApprove::class); $user->save(); $user->name = 'Doe John'; $user->save(); - $this->assertEquals('John Doe', $user->fresh()->name); + $this->assertEquals('John Doe', $user->fresh()->name); } -} \ No newline at end of file +} diff --git a/tests/Models/UserCanApprove.php b/tests/Models/UserCanApprove.php index 4a1bea0..1fd5a08 100644 --- a/tests/Models/UserCanApprove.php +++ b/tests/Models/UserCanApprove.php @@ -2,11 +2,10 @@ namespace Victorlap\Approvable\Tests\Models; - class UserCanApprove extends User { protected function currentUserCanApprove() { return true; } -} \ No newline at end of file +} diff --git a/tests/Models/UserCannotApprove.php b/tests/Models/UserCannotApprove.php index e504bd9..4b46d67 100644 --- a/tests/Models/UserCannotApprove.php +++ b/tests/Models/UserCannotApprove.php @@ -2,11 +2,10 @@ namespace Victorlap\Approvable\Tests\Models; - class UserCannotApprove extends User { protected function currentUserCanApprove() { return false; } -} \ No newline at end of file +} diff --git a/tests/TestCase.php b/tests/TestCase.php index 91ad817..3a76298 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -54,4 +54,4 @@ protected function getPackageProviders($app) ConsoleServiceProvider::class, ]; } -} \ No newline at end of file +}