diff options
Diffstat (limited to 'tests/units/Validator/CommentValidatorTest.php')
-rw-r--r-- | tests/units/Validator/CommentValidatorTest.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/units/Validator/CommentValidatorTest.php b/tests/units/Validator/CommentValidatorTest.php index 378fe924..ce65e7a3 100644 --- a/tests/units/Validator/CommentValidatorTest.php +++ b/tests/units/Validator/CommentValidatorTest.php @@ -8,50 +8,50 @@ class CommentValidatorTest extends Base { public function testValidateCreation() { - $validator = new CommentValidator($this->container); + $commentValidator = new CommentValidator($this->container); - $result = $validator->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => 'bla')); + $result = $commentValidator->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => 'bla')); $this->assertTrue($result[0]); - $result = $validator->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => '')); + $result = $commentValidator->validateCreation(array('user_id' => 1, 'task_id' => 1, 'comment' => '')); $this->assertFalse($result[0]); - $result = $validator->validateCreation(array('user_id' => 1, 'task_id' => 'a', 'comment' => 'bla')); + $result = $commentValidator->validateCreation(array('user_id' => 1, 'task_id' => 'a', 'comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateCreation(array('user_id' => 'b', 'task_id' => 1, 'comment' => 'bla')); + $result = $commentValidator->validateCreation(array('user_id' => 'b', 'task_id' => 1, 'comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateCreation(array('user_id' => 1, 'comment' => 'bla')); + $result = $commentValidator->validateCreation(array('user_id' => 1, 'comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateCreation(array('task_id' => 1, 'comment' => 'bla')); + $result = $commentValidator->validateCreation(array('task_id' => 1, 'comment' => 'bla')); $this->assertTrue($result[0]); - $result = $validator->validateCreation(array('comment' => 'bla')); + $result = $commentValidator->validateCreation(array('comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateCreation(array()); + $result = $commentValidator->validateCreation(array()); $this->assertFalse($result[0]); } public function testValidateModification() { - $validator = new CommentValidator($this->container); + $commentValidator = new CommentValidator($this->container); - $result = $validator->validateModification(array('id' => 1, 'comment' => 'bla')); + $result = $commentValidator->validateModification(array('id' => 1, 'comment' => 'bla')); $this->assertTrue($result[0]); - $result = $validator->validateModification(array('id' => 1, 'comment' => '')); + $result = $commentValidator->validateModification(array('id' => 1, 'comment' => '')); $this->assertFalse($result[0]); - $result = $validator->validateModification(array('comment' => 'bla')); + $result = $commentValidator->validateModification(array('comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateModification(array('id' => 'b', 'comment' => 'bla')); + $result = $commentValidator->validateModification(array('id' => 'b', 'comment' => 'bla')); $this->assertFalse($result[0]); - $result = $validator->validateModification(array()); + $result = $commentValidator->validateModification(array()); $this->assertFalse($result[0]); } } |