for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Mockery as m;
use JsLocalization\Console\RefreshCommand;
class RefreshCommandTest extends TestCase
{
public function tearDown(): void
m::close();
parent::tearDown();
}
public function testNoLocalesConfigException()
// Mock Config
Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock'));
$config->shouldReceive('get')->with('js-localization.locales')
->andReturn(null);
$this->setExpectedException('Exception');
setExpectedException()
RefreshCommandTest
setExpectedExceptionFromAnnotation()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
$this->runCommand();
protected function runCommand()
$cmd = new RefreshCommand();
$cmd->run(
new Symfony\Component\Console\Input\ArrayInput(['package' => 'foo']),
new Symfony\Component\Console\Output\NullOutput
);