blast-project/tests-bundle

扩展 Symfony KernelTestCase

安装: 820

依赖项: 3

建议者: 0

安全性: 0

星标: 0

关注者: 5

分支: 0

开放性问题: 0

类型:symfony-bundle

0.6.4 2017-11-03 14:59 UTC

This package is not auto-updated.

Last update: 2024-09-15 03:29:10 UTC


README

Build Status Coverage Status License

Latest Stable Version Latest Unstable Version Total Downloads

通过 BlastTestCase 扩展 Symfony KernelTestCase,允许您快速访问一些有用的例行程序...

安装

下载

$ composer require blast-project/tests-bundle

示例

检查 blast* 服务

use Blast\TestsBundle\Functional\BlastTestCase;

class BlastServiceTest extends BlastTestCase
{
    protected function setUp()
    {
        parent::setUp();
    }
    
    public function testServicesAreInitializable()
    {
        $this->isServicesAreInitializable('blast');
    }
}

启动控制台命令

use Blast\TestsBundle\Functional\BlastTestCase;

class CollectGarbageCommandTest extends BlastTestCase
{
    protected function setUp()
    {
        parent::setUp();
    }
    
    public function testCommand()
    {
      $this->cacheClear();
      // or
      $this->launchCommand([
            'command' => 'cache:clear',
            '--no-warmup' => true,
      ]);
    }
}