phpunit dbunit @dataProvider nie działa

Spędziłem dużo czasu szukając problemu, ale nic nie znalazłem.

To sais „testAdd spowodował BŁĄD: Brakujący argument”. Po prostu test dataProvider nie jest wykonywany. Próbowałem umieścić die () w obiekcie dataProvider i nie umarł.

To jest mój kod:

class LabelEntityModelTest extends PHPUnit_Extensions_Database_TestCase
{

    private static $connection = NULL;

    /**
     * @var \CXNS\DB\Connections\Connection
     */
    private static $appConnection;
    private static $table;

    public function __construct()
    {
        if (self::$connection) {
            return;
        }

        $pdo = new \PDO($GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWD']);
        self::$appConnection = new \CXNS\DB\Connections\Connection(array("prefix" => "test_", "driver" => "pdo", "resource" => $pdo));
        self::$appConnection->connect();

        self::$connection = $this->createDefaultDBConnection($pdo, 'mysql');

        self::$table = $this->createXMLDataSet(__DIR__ . '/fixtures/tables.xml');
    }

    protected function getDataSet()
    {
        return self::$table;
    }

    public function getConnection()
    {
        return self::$connection;
    }

    public function getAppConnection()
    {
        return self::$appConnection;
    }

    /**
     * @group onlyThis
     * @dataProvider providerAdd
     */
    public function testAdd($labelId, $entityId)
    {
        $lem = new \appLibs\Labels\LabelEntityModel($this->getAppConnection(), "contacts");

        $lem->add($labelId, $entityId);

        $count = $this->getAppConnection()
            ->select("id")
            ->from("label_relationships")
            ->where("label_id = %i", $labelId)
            ->where("table_ref_id = %i", $entityId)
            ->count();

        $this->assertEquals(1, $count, "insert failed");
    }

    public function providerAdd()
    {
        return array(
            array(2, 3),
            array(3, 4),
            array(3, 4),
            array(3, 4),
            array(3, 4),
            array(3, 4),
            array(5, 7)
        );
    }
}

Dziękuję za pomoc.

questionAnswers(1)

yourAnswerToTheQuestion