/** * 表示件数の入力チェック * @test * @dataProvider displayCountValidateDataProvider */ public function invalidDisplayCountCase($expected, $data, $msg) { $dto = new DnsUserCriteriaDto(); EntitySupport::autoSet($dto, $data); $errors = $this->validator->validate($dto); $this->assertEquals($expected, count($errors), $msg); }
/** * プロパティの入力チェックを行う * @test * @dataProvider dataProvider */ public function validateProperty($expected, $data, $msg) { $dto = new DnsUserExportDto(); EntitySupport::autoSet($dto, $data); $errors = $this->validator->validate($dto); $this->assertEquals($expected, count($errors), $msg); }