{"action":"opened","issue":{"url":"https://api.github.com/repos/mrtnzlml/testbench/issues/17","repository_url":"https://api.github.com/repos/mrtnzlml/testbench","labels_url":"https://api.github.com/repos/mrtnzlml/testbench/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/mrtnzlml/testbench/issues/17/comments","events_url":"https://api.github.com/repos/mrtnzlml/testbench/issues/17/events","html_url":"https://github.com/mrtnzlml/testbench/issues/17","id":143228144,"number":17,"title":"Problém s @dataProviderom","user":{"login":"camohub","id":8393426,"avatar_url":"https://avatars.githubusercontent.com/u/8393426?v=3","gravatar_id":"","url":"https://api.github.com/users/camohub","html_url":"https://github.com/camohub","followers_url":"https://api.github.com/users/camohub/followers","following_url":"https://api.github.com/users/camohub/following{/other_user}","gists_url":"https://api.github.com/users/camohub/gists{/gist_id}","starred_url":"https://api.github.com/users/camohub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camohub/subscriptions","organizations_url":"https://api.github.com/users/camohub/orgs","repos_url":"https://api.github.com/users/camohub/repos","events_url":"https://api.github.com/users/camohub/events{/privacy}","received_events_url":"https://api.github.com/users/camohub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-24T12:05:17Z","updated_at":"2016-03-24T12:05:17Z","closed_at":null,"body":"Zdravím,\r\nmám menší problém s @dataProviderom. Testujem formulár s jedným políčkom, ktoré je required. Urobil som test, kde by raz mal required prejsť a raz nie. Keď to testujem tak dostanem vždy rovnaký výsledok. Vždy ten, čo je prvý v @dataProvidery. \r\n\r\n``` php\r\npublic function commentFormParameters()\r\n{\r\n    return [\r\n\t    [ [ 'test' => 1, 'content' => '', 'do' => 'commentForm-submit' ] ],\r\n\t    [ [ 'test' => 2, 'content' => 'Some required content.', 'do' => 'commentForm-submit' ] ],\r\n    ];\r\n}\r\n```\r\nTeda prvý test by nemal prejsť a druhý áno. Ale getErrors() vracia vždy, výsledok prvého testu a nereaguje na zmenu $post prametrov.\r\nCelý test vyzerá takto:\r\n``` php\r\n/**\r\n * @dataProvider commentFormParameters\r\n * @param $post\r\n */\r\npublic function testCommentForm( $post )\r\n{\r\n    $response = $this->check( 'Articles:show', [ 'title' => 'ako-islo-vajce-na-vandrovku' ], $post );\r\n    $errors = $this->getPresenter()->getComponent( 'commentForm' )->getErrors();\r\n\r\n    Assert::true( count( $errors ) > 0 );\r\n    Debugger::log( $errors );\r\n}\r\n```\r\nAko to vyriešim?\r\nPodľa všetkého s to týka podmienky v metóde check()\r\n```php\r\nif (!$this->__testbench_presenter) .... \r\n```\r\nTakže vlastne by malo stačiť priradiť NULL?\r\n```php\r\n$this->__testbench_presenter = NULL;\r\n```"}}