方法数据提供程序在安装之前执

时间:2013-11-27 12:31:57

标签: symfony phpunit

我有这样的测试类

class CallTest extends WebTestCase
{
    /** @var \Doctrine\Common\DataFixtures\Executor\AbstractExecutor  */
    protected $executor;

    public function setUp()
    {
        $this->executor = $this->loadFixtures(array('Tests\Fixtures\LoadCallData'));
    }

    /**
     * @dataProvider callProvider
     */
    public function testCall($service, $token, $fileId, $phone, $callTime)
    {
      // some code for testing
    }


    /**
     * Данные для проверки
     * @return array
     */
    public function callProvider()
    {
       $devices = $this->devicesProvider(); 
       // providing some data
      return array(.....);
    }

    public function devicesProvider()
    {
        return array_map(
            function ($device) use($service) {
                return array($service, $device);
            },
            $devices
        );
    }
}

问题是setUp方法没有rans

0 个答案:

没有答案