Last active
November 29, 2015 14:44
-
-
Save jonphipps/e1b39fb0f05d218b09de to your computer and use it in GitHub Desktop.
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
<?php | |
class BulkUpdateModelTest extends TestCase | |
{ | |
/** @expectedException ReflectionException */ | |
public function testItthrowsAnException_if_the_requested_model_is_invalid() | |
{ | |
$status = $this->artisan('mynamespace:bulkupdate',['model' => 'foo']); | |
} | |
public function testItDisplaysAnError_if_the_requested_model_is_invalid() | |
{ | |
$kernel = $this->app->make(Illuminate\Contracts\Console\Kernel::class); | |
$status = $kernel->handle( | |
$input = new Symfony\Component\Console\Input\ArrayInput(array( | |
'command' => 'mynamespace:bulkupdate', | |
'model' => 'foo', | |
)), | |
$output = new Symfony\Component\Console\Output\BufferedOutput | |
); | |
$this->assertContains('Class \App\Models\foo does not exist', $output->fetch()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment