-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e90f68
commit 2d87fbe
Showing
14 changed files
with
163 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Tests\Feature\Make; | ||
|
||
use Tests\TestCase; | ||
use Tests\RefreshPacker; | ||
use Illuminate\Support\Facades\Artisan; | ||
|
||
class ModelTest extends TestCase | ||
{ | ||
use RefreshPacker; | ||
|
||
public function test_it_create_model_file() | ||
{ | ||
Artisan::call('make:model User'); | ||
$this->isFileExists('src/models/User.php'); | ||
$content = file_get_contents($this->_testPath() . 'src/models/User.php'); | ||
$this->assertStringContainsString('namespace Bitfumes\TestApp\Models;', $content); | ||
$this->assertStringContainsString('class User extends Model', $content); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Tests\Feature\Make; | ||
|
||
use Tests\TestCase; | ||
use Tests\RefreshPacker; | ||
use Illuminate\Support\Facades\Artisan; | ||
|
||
class TestsTest extends TestCase | ||
{ | ||
use RefreshPacker; | ||
|
||
public function test_it_create_feature_test_file() | ||
{ | ||
Artisan::call('make:test UserTest'); | ||
$this->isFileExists('tests/feature/UserTest.php'); | ||
$content = file_get_contents($this->_testPath() . 'tests/feature/UserTest.php'); | ||
$this->assertStringContainsString('class UserTest extends TestCase', $content); | ||
} | ||
|
||
public function test_it_create_unit_test_file() | ||
{ | ||
Artisan::call('make:test UserTest --unit'); | ||
$this->isFileExists('tests/unit/UserTest.php'); | ||
$content = file_get_contents($this->_testPath() . 'tests/unit/UserTest.php'); | ||
$this->assertStringContainsString('class UserTest extends TestCase', $content); | ||
} | ||
} |