summaryrefslogtreecommitdiff
path: root/tests/units/Validator/ExternalLinkValidatorTest.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-10-08 09:58:11 -0400
committerFrederic Guillot <fred@kanboard.net>2016-10-08 09:58:11 -0400
commitc2f1cc8f7419fe4eb5e9bd5e6ce05d90e719be17 (patch)
tree93900cc242574a346f14e2002f050b5f2c7dc55e /tests/units/Validator/ExternalLinkValidatorTest.php
parent1466afb771f0291bc350441aede14c97459128e7 (diff)
Restrict task complexity to a specific range to avoid integer overflow
Diffstat (limited to 'tests/units/Validator/ExternalLinkValidatorTest.php')
-rw-r--r--tests/units/Validator/ExternalLinkValidatorTest.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/units/Validator/ExternalLinkValidatorTest.php b/tests/units/Validator/ExternalLinkValidatorTest.php
index b41b779a..c94c31db 100644
--- a/tests/units/Validator/ExternalLinkValidatorTest.php
+++ b/tests/units/Validator/ExternalLinkValidatorTest.php
@@ -8,27 +8,27 @@ class ExternalLinkValidatorTest extends Base
{
public function testValidateCreation()
{
- $validator = new ExternalLinkValidator($this->container);
+ $externalLinkValidator = new ExternalLinkValidator($this->container);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
$this->assertTrue($result[0]);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 'abc', 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 'abc', 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
$this->assertFalse($result[0]);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink'));
$this->assertFalse($result[0]);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'title' => 'Title', 'dependency' => 'related'));
$this->assertFalse($result[0]);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'link_type' => 'weblink', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'task_id' => 1, 'link_type' => 'weblink', 'dependency' => 'related'));
$this->assertFalse($result[0]);
- $result = $validator->validateCreation(array('url' => 'http://somewhere', 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('url' => 'http://somewhere', 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
$this->assertFalse($result[0]);
- $result = $validator->validateCreation(array('task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
+ $result = $externalLinkValidator->validateCreation(array('task_id' => 1, 'title' => 'Title', 'link_type' => 'weblink', 'dependency' => 'related'));
$this->assertFalse($result[0]);
}