phpunit

    0热度

    1回答

    我正在写很多单元测试,恐怕有一天我会回来阅读测试代码,不能理解测试的内容。 的问题是:我如何使用文件PHPDoc的PHPUnit的测试?

    4热度

    1回答

    我正在codeigniter上运行phpunit测试,我有一段admin_test.php文件与这段代码。 class Admin_test extends PHPUnit_Framework_TestCase{ private $CI; public function __construct() { // create instance variabl

    0热度

    1回答

    我从phpunit运行测试套件的输出。我了解期间(.)是指通过测试,但逗号(,)是什么意思? 16:10:12 PHPUnit 6.1.3 by Sebastian Bergmann and contributors. ..............................F...,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,....,,,,,,,,,,,,,,,,,,,

    0热度

    1回答

    我有大量的PHP单元测试套件中的测试。运行完整的套件的时候 所有的测试会通过,但是单独运行时,某些测试可能经过或取决于我如何调用失败PHP单位: $ php phpunit --configuration phpunit.xml --filter FooIntegrationTest PHPUnit 5.7.19 by Sebastian Bergmann and contributors.

    3热度

    1回答

    我正在运行Linux Mint 18.1。我的IDE是PhpStorm,我正尝试通过作曲家安装PHPUnit。我遵循https://getcomposer.org/download/的安装步骤。 问题1个 - 用于PHPUnit的/ PHPUnit的6.4.x-dev的安装请求 - 通过的PHPUnit/PHPUnit的>满足的[6.4.x-dev的]。 - phpunit/phpunit 6.4

    1热度

    1回答

    基于Alvin Bunk文章link to article我想创建一个web-cralwer,它登录到一个网站然后提交一个表单。 我的问题是,在该网站上有一个Ajax块,在单击和空链接后生成一些输入,我需要填写,所以我需要点击某个空链接或手动插入输入。 我改变了下面的代码在很多方面,试图使其工作,但对访问功能我被困 我得到未捕获的错误:空调用一个成员函数访问() <?php require 'v

    2热度

    1回答

    运行时,我创建了错误的服务器一个新的作曲家的项目,我有以下目录结构: PROJNAME (dir) --PROJNAME.php (my project file) tests (dir) --PROJNAMETest.php 我已经运行下面的命令它的工作原理错误的服务器上: vendor/bin/phpunit --bootstrap PROJNAME.php

    1热度

    2回答

    我正在尝试为我的应用程序创建单元测试,但我想提供一些建议。 我有以下方法: /** * This methods check if the user can apply to the team, it search if he have a username for the game and if he doesn't already applied for another team in th

    0热度

    1回答

    在处理其他信息而不是消息或代码时,对抛出的异常执行任意断言可能很有用。 有没有更简单,可读,或更“PHPUnit的推荐方式”来做到这一点,比下面的例子: public function testTitleShouldNotAcceptArrayAsValue() { /* Arrange */ $schema = new sch\ObjectSchema();

    0热度

    1回答

    类我测试: class Calculate { public $x; public $y; public function __construct($x, $y) { $this->x = $x; $this->y = $y; } public function add(): int { return $th