for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Aimeos\ShopBundle\Tests\Command;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Aimeos\ShopBundle\Command;
class AccountCommandTest extends WebTestCase
{
public function testAccountCommandNew()
$kernel = $this->createKernel();
$kernel->boot();
$application = new Application( $kernel );
$application->add( new Command\AccountCommand() );
$command = $application->find( 'aimeos:account' );
$commandTester = new CommandTester( $command );
$commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'email' => '[email protected]', '--password' => 'test' ) );
$this->assertEquals( 0, $commandTester->getStatusCode() );
}
public function testAccountCommandAdmin()
$commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'email' => '[email protected]', '--password' => 'test', '--admin' => true ) );