Skip to content

Commit

Permalink
test: Add Test for TraitMakeCommand (#50417)
Browse files Browse the repository at this point in the history
  • Loading branch information
saMahmoudzadeh authored Mar 8, 2024
1 parent bb80a3b commit ddd2999
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/Integration/Generators/TraitMakeCommandTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

namespace Illuminate\Tests\Integration\Generators;

class TraitMakeCommandTest extends TestCase
{
public function testItCanGenerateTraitFile()
{
$this->artisan('make:trait', ['name' => 'FooTrait'])
->assertExitCode(0);

$this->assertFileContains([
'namespace App;',
'trait FooTrait',
], 'app/FooTrait.php');
}
}

0 comments on commit ddd2999

Please sign in to comment.