Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve assertion and testing classes autoloading #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

before_script:
- composer install
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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use PHPUnit\Framework\TestCase;
use Rakit\Validation\Rules\Boolean;
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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\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 Rakit\Validation\Tests;
namespace Rakit\Validation\Tests\Rules;

use Rakit\Validation\Rules\Url;
use PHPUnit\Framework\TestCase;
Expand Down
6 changes: 3 additions & 3 deletions tests/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ public function testGetValidData()
], $validData);

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

public function testGetInvalidData()
Expand Down Expand Up @@ -1366,8 +1366,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