예제 #1
0
 /**
  * プロパティの入力チェックを行う
  * @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);
 }
 /**
  * 表示件数の入力チェック
  * @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);
 }
예제 #3
0
 /**
  * Deletes asset by ID
  *
  * @param string $id    ID of the asset
  * @return response
  * @throws \Exception
  */
 public function deleteAsset($id)
 {
     $params = array('id' => $id);
     $params = $this->validator->validate($params);
     try {
         return $this->client->sendRequest('assets/{id}', $params, 'DELETE');
     } catch (\Exception $ex) {
         throw $ex;
     }
 }
예제 #4
0
 /**
  * Validate the given subject.
  *
  * @param mixed $subject
  * @return bool
  */
 public function validate($subject) : bool
 {
     return !$this->validator->validate($subject);
 }
예제 #5
0
 /**
  * @param mixed $value
  * @param array $args
  * @return bool
  */
 public function validate($value, array $args = array())
 {
     return $this->validator->validate($value, $args);
 }
예제 #6
0
 /**
  * Forward the invocation to the validate method of the validator.
  *
  * @return bool
  */
 public function __invoke(...$args) : bool
 {
     return $this->validator->validate(...$args);
 }
예제 #7
0
 /**
  * Performs validation.
  *
  * @return bool
  */
 public function validate()
 {
     return $this->validator->validate();
 }