Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Dec 13, 2024
1 parent 2d24527 commit 1bca393
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions tests/CustomValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions tests/DefaultValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class HelpersTest extends TestCase
{
public function testStatesBR()
public function test_states_br()
{
$this->assertIsArray(statesBR());
$this->assertArrayHasKey('SP', statesBR());
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -15,6 +16,6 @@ protected static function getServiceProviderClass(): string

protected static function getRequiredServiceProviders(): array
{
return [CarbonServiceProvider::class];
return [CarbonServiceProvider::class, TranslationServiceProvider::class];
}
}

0 comments on commit 1bca393

Please sign in to comment.