BitBucket管道在测试用例上失败

时间:2019-05-19 13:26:29

标签: php cakephp deployment bitbucket bitbucket-pipelines

我很难配置BitBucket管道以将CakePHP应用程序部署到托管服务器。 阅读一些我最终通过此管道完成的教程:

image: edbizarro/bitbucket-pipelines-php7

pipelines:
  branches:
    master:
      - step:
          caches:
            - composer
          script:
            - composer install --no-interaction --no-progress --prefer-dist
            - composer test
            - composer deploy-to-production

但它总是失败:

  • 构建设置->确定
  • composer安装->确定
  • 编写器测试->失败
  

+作曲家测试   phpunit --colors =总是   不建议使用的错误:不建议使用Plugin :: load()。请改用Application :: addPlugin()。此方法将在4.0.0中删除。 -/opt/atlassian/pipelines/agent/build/config/bootstrap.php,第179行    您可以通过在config / app.php中将Error.errorLevel设置为E_ALL & ~E_USER_DEPRECATED来禁用弃用警告。在[/opt/atlassian/pipelines/agent/build/vendor/cakephp/cakephp/src/Core/functions.php,第311行]

     

Sebastian Bergmann和贡献者的PHPUnit 6.5.14。

     

异常:无法为“ App \ Test \ TestCase \ Controller \ CustomersControllerTest”测试用例插入固定装置。 SQLSTATE [HY000] [2002]在[/opt/atlassian/pipelines/agent/build/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php,第380行]中没有此类文件或目录   脚本phpunit --colors =始终处理返回错误代码244的测试事件

我不能ls虚拟远程文件夹,但是我可以挖掘...所以我检查了App\Test\TestCase\Controller\CustomersControllerTest

<?php
namespace App\Test\TestCase\Controller;

use App\Controller\CustomersController;
use Cake\TestSuite\IntegrationTestTrait;
use Cake\TestSuite\TestCase;

class CustomersControllerTest extends TestCase
{
    use IntegrationTestTrait;

    public $fixtures = [
        'app.Customers',
        'app.Orders'
    ];

    public function testIndex()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    public function testView()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    public function testAdd()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    public function testEdit()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }

    public function testDelete()
    {
        $this->markTestIncomplete('Not implemented yet.');
    }
}

因为我没有使用测试,可以(安全)避免执行composer test步骤吗?

顺便说一句,在托管服务器上,PHP版本是5.6,而在管道映像中则指定了版本7。这可能会导致问题吗?

0 个答案:

没有答案
相关问题