Skip to content

Commit 0508547

Browse files
committed
Add Test for Console/RepositoryTest
1 parent ff69174 commit 0508547

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace PPSpaces\Tests\Feature\Console;
4+
5+
use PPSpaces\Tests\App\User;
6+
use PPSpaces\Tests\TestCase;
7+
8+
/**
9+
* Class DatabaseTest
10+
*/
11+
class RepositoryTest extends TestCase
12+
{
13+
public function test_it_can_generate_repository_command()
14+
{
15+
$this->artisan('make:repository', [
16+
'name' => 'LogsRepository'
17+
])
18+
->expectsOutput('Repository created successfully.')
19+
->assertExitCode(0);
20+
}
21+
22+
public function test_it_can_generate_model_repository_command()
23+
{
24+
$this->artisan('make:repository', [
25+
'name' => 'UserRepository',
26+
'--model' => 'PPSpaces\Tests\App\User'
27+
])
28+
->expectsOutput('Repository created successfully.')
29+
->assertExitCode(0);
30+
}
31+
}

0 commit comments

Comments
 (0)