From 1bca393e476235d533b7148be27185a0aea73ca4 Mon Sep 17 00:00:00 2001 From: Ricardo Gobbo de Souza Date: Fri, 13 Dec 2024 09:51:29 -0300 Subject: [PATCH] Formatting --- tests/CustomValuesTest.php | 10 +++++----- tests/DefaultValuesTest.php | 10 +++++----- tests/HelpersTest.php | 2 +- tests/TestCase.php | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/CustomValuesTest.php b/tests/CustomValuesTest.php index effae91..9c392e7 100644 --- a/tests/CustomValuesTest.php +++ b/tests/CustomValuesTest.php @@ -40,12 +40,12 @@ protected function getEnvironmentSetUp($app): void ]); } - public function testModelUnguarded() + public function test_model_unguarded() { $this->assertTrue(Model::isUnguarded()); } - public function testLocale() + public function test_locale() { $this->app->setLocale('en'); $this->assertEquals('en', Carbon::getLocale()); @@ -56,19 +56,19 @@ public function testLocale() $this->assertEquals('janeiro', Str::lower(Carbon::parse('2020-01-01')->getTranslatedMonthName())); } - public function testSchemaDefaultStringLength() + public function test_schema_default_string_length() { $this->assertEquals(255, Builder::$defaultStringLength); } - public function testHttpsEnabled() + public function test_https_enabled() { $kernel = $this->app->make(Kernel::class); $this->assertTrue($kernel->hasMiddleware(HttpsProtocolMiddleware::class)); $this->assertEquals('https://localhost', Url::to('/')); } - public function testPaginatorDefaultView() + public function test_paginator_default_view() { $this->assertEquals('paginator-defaultView', Paginator::$defaultView); $this->assertEquals('paginator-defaultSimpleView', Paginator::$defaultSimpleView); diff --git a/tests/DefaultValuesTest.php b/tests/DefaultValuesTest.php index ea814c2..227f415 100644 --- a/tests/DefaultValuesTest.php +++ b/tests/DefaultValuesTest.php @@ -12,12 +12,12 @@ class DefaultValuesTest extends TestCase { - public function testModelUnguarded() + public function test_model_unguarded() { $this->assertFalse(Model::isUnguarded()); } - public function testEventsLocaleUpdated() + public function test_events_locale_updated() { Event::fake(); @@ -26,19 +26,19 @@ public function testEventsLocaleUpdated() Event::assertDispatched('Illuminate\Foundation\Events\LocaleUpdated'); } - public function testSchemaDefaultStringLength() + public function test_schema_default_string_length() { $this->assertEquals(150, Builder::$defaultStringLength); } - public function testHttpsIsDisabledOnDevelopmentMode() + public function test_https_is_disabled_on_development_mode() { $kernel = $this->app->make(Kernel::class); $this->assertFalse($kernel->hasMiddleware(HttpsProtocolMiddleware::class)); $this->assertEquals('http://localhost', Url::to('/')); } - public function testPaginatorDefaultView() + public function test_paginator_default_view() { $this->assertEquals('pagination::tailwind', Paginator::$defaultView); $this->assertEquals('pagination::simple-tailwind', Paginator::$defaultSimpleView); diff --git a/tests/HelpersTest.php b/tests/HelpersTest.php index 4f3b798..053a82b 100644 --- a/tests/HelpersTest.php +++ b/tests/HelpersTest.php @@ -4,7 +4,7 @@ class HelpersTest extends TestCase { - public function testStatesBR() + public function test_states_br() { $this->assertIsArray(statesBR()); $this->assertArrayHasKey('SP', statesBR()); diff --git a/tests/TestCase.php b/tests/TestCase.php index db341ef..dbeefdb 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -3,6 +3,7 @@ namespace Datalogix\Utils\Tests; use Carbon\Laravel\ServiceProvider as CarbonServiceProvider; +use Datalogix\Translation\TranslationServiceProvider; use Datalogix\Utils\UtilsServiceProvider; use GrahamCampbell\TestBench\AbstractPackageTestCase; @@ -15,6 +16,6 @@ protected static function getServiceProviderClass(): string protected static function getRequiredServiceProviders(): array { - return [CarbonServiceProvider::class]; + return [CarbonServiceProvider::class, TranslationServiceProvider::class]; } }