Skip to content

Commit 19865f2

Browse files
committed
ITT: New assertEloquentIsIncrementing and assertEloquentIsNotIncrementing assertions tests added.
1 parent 965c1b0 commit 19865f2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/TestingTools/Asserts/EloquentAssertsTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminated\Testing\TestingTools\Tests\Asserts;
44

5+
use Category;
56
use Comment;
67
use Illuminated\Testing\TestingTools\Tests\TestCase;
78
use Post;
@@ -20,6 +21,18 @@ public function it_has_eloquent_table_not_equals_assertion()
2021
$this->assertEloquentTableNotEquals(Post::class, 'users');
2122
}
2223

24+
/** @test */
25+
public function it_has_eloquent_is_incrementing_assertion()
26+
{
27+
$this->assertEloquentIsIncrementing(Post::class);
28+
}
29+
30+
/** @test */
31+
public function it_has_eloquent_is_not_incrementing_assertion()
32+
{
33+
$this->assertEloquentIsNotIncrementing(Category::class);
34+
}
35+
2336
/** @test */
2437
public function it_has_eloquent_fillable_equals_assertion()
2538
{
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
use Illuminate\Database\Eloquent\Model;
4+
5+
class Category extends Model
6+
{
7+
protected $table = 'categories';
8+
protected $fillable = ['name'];
9+
public $incrementing = false;
10+
}

0 commit comments

Comments
 (0)