Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gdarko committed Jul 3, 2022
1 parent b5f7e59 commit 9f89973
Show file tree
Hide file tree
Showing 37 changed files with 44 additions and 42 deletions.
2 changes: 1 addition & 1 deletion tests/Fixtures/Even.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Fixtures;

use IgniteKit\Validation\Rule;

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Required.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Fixtures;

use IgniteKit\Validation\Rule;

Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AcceptedTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Accepted;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AfterTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\After;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AlphaDashTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\AlphaDash;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AlphaNumTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\AlphaNum;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AlphaSpacesTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\AlphaSpaces;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/AlphaTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Alpha;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/BeforeTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Before;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/BetweenTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Between;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/BooleanTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Boolean;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/CallbackTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Callback;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/DateTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Date;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/DefaultsTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Defaults;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/DigitsBetweenTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\DigitsBetween;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/DigitsTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Digits;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/EmailTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Email;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/ExtensionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Extension;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/InTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\In;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/IntegerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Integer;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/IpTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Ip;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/Ipv4Test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Ipv4;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/Ipv6Test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Ipv6;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/JsonTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Json;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/LowercaseTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Lowercase;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/MaxTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Max;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/MimesTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Mimes;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/MinTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Min;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/NotInTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\NotIn;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/NumericTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Numeric;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/RegexTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Regex;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/RequiredTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Required;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/TypeArrayTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\TypeArray;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/UploadedFileTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\UploadedFile;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/UppercaseTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Uppercase;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Rules/UrlTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace IgniteKit\Validation\Tests;
namespace IgniteKit\Validation\Tests\Rules;

use IgniteKit\Validation\Rules\Url;
use PHPUnit\Framework\TestCase;
Expand Down
14 changes: 8 additions & 6 deletions tests/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
use DateTime;
use IgniteKit\Validation\RuleNotFoundException;
use IgniteKit\Validation\RuleQuashException;
use PHPUnit\Framework\TestCase;
use IgniteKit\Validation\Rule;
use IgniteKit\Validation\Rules\UploadedFile;
use IgniteKit\Validation\Tests\Fixtures\Required;
use IgniteKit\Validation\Validator;
use IgniteKit\Validation\Rules\UploadedFile;
use IgniteKit\Validation\Tests\Fixtures\Even;

use PHPUnit\Framework\TestCase;

class ValidatorTest extends TestCase
{
Expand Down Expand Up @@ -1298,7 +1300,7 @@ public function testGetValidData()
], $validData);

$stuffs = $validData['stuffs'];
$this->assertFalse(isset($stuffs['three']));
$this->assertArrayNotHasKey('three', $stuffs);
}

public function testGetInvalidData()
Expand Down Expand Up @@ -1351,8 +1353,8 @@ public function testGetInvalidData()
], $invalidData);

$stuffs = $invalidData['stuffs'];
$this->assertFalse(isset($stuffs['one']));
$this->assertFalse(isset($stuffs['two']));
$this->assertArrayNotHasKey('one', $stuffs);
$this->assertArrayNotHasKey('two', $stuffs);
}

public function testRuleInInvalidMessages()
Expand Down

0 comments on commit 9f89973

Please sign in to comment.