First test

This commit is contained in:
PovilasKorop
2021-11-15 08:25:07 +02:00
commit 8c860fbac5
86 changed files with 11266 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace Tests\Feature;
use App\Models\News;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class EloquentTest extends TestCase
{
use RefreshDatabase;
public function test_create_model_different_table()
{
$article = ['title' => 'Something', 'news_text' => 'Something'];
News::create($article);
$this->assertDatabaseHas('morning_news', $article);
}
}