Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Mar 8, 2023
1 parent 12b2105 commit acf5b37
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/eloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ function table_name($model): string

/**
* Get the primary key value from Eloquent model.
*
* @param \Illuminate\Database\Eloquent\Model|null $model
*
* @return int|string|null
*/
function safe_key(?Model $model)
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/EloquentSafeKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function it_cant_get_safe_key_for_a_pivot_without_primary_key()
$this->assertNull(safe_key(new Pivot));
}

/** @test */
/** @test */
public function it_returns_null_when_given_null()
{
$this->assertNull(safe_key(null));
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/IsRtlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class IsRtlTest extends TestCase
{
/**
* @test
*
* @dataProvider localeDataProvider
*/
public function it_can_detect_locale($locale, $direction)
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/SafeIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SafeIntTest extends TestCase
{
/**
* @test
*
* @dataProvider castIdsDataProvider
*/
public function it_can_cast_ids($given, $expected)
Expand Down
1 change: 1 addition & 0 deletions tests/Feature/SchemalessUrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SchemalessUrlTest extends TestCase
{
/**
* @test
*
* @dataProvider castSchemalessUrlDataProvider
*/
public function it_can_cast_schemaless_url($given, $expected)
Expand Down
2 changes: 0 additions & 2 deletions tests/Feature/UserModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace NovaKit\Tests\Feature;

use Illuminate\Foundation\Auth\User;
use function NovaKit\user_model;
use Orchestra\Testbench\Factories\UserFactory;
use Orchestra\Testbench\TestCase;

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/IsColumnNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class IsColumnNameTest extends TestCase
{
/**
* @test
*
* @dataProvider validColumnNameDataProvider
*/
public function it_can_validate_column_name($given)
Expand All @@ -18,6 +19,7 @@ public function it_can_validate_column_name($given)

/**
* @test
*
* @dataProvider invalidColumnNameDataProvider
*/
public function it_cant_validate_invalid_column_name($given)
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/SafeIntTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SafeIntTest extends TestCase
{
/**
* @test
*
* @dataProvider castSafeIntDataProvider
*/
public function it_can_cast_safe_int($given, $expected)
Expand Down

0 comments on commit acf5b37

Please sign in to comment.