Skip to content

Commit 77e707b

Browse files
Merge pull request #5 from MaplePHP/develop
Preparing for unit testing
2 parents de7d9e0 + 6bb7c85 commit 77e707b

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

composer.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "maplephp/validate",
33
"type": "library",
4+
"version": "1.0.3",
45
"description": "User-friendly input validation library.",
56
"keywords": ["validation", "input", "data", "validate request"],
67
"homepage": "https://wazabii.se",
@@ -20,17 +21,8 @@
2021
"maplephp/dto": "^1.0"
2122
},
2223
"require-dev": {
23-
"maplephp/unitary": "^1.0"
24+
"maplephp/unitary": "^1.0.0"
2425
},
25-
"repositories": [
26-
{
27-
"type": "path",
28-
"url": "../unitary",
29-
"options": {
30-
"symlink": true
31-
}
32-
}
33-
],
3426
"autoload": {
3527
"psr-4": {
3628
"MaplePHP\\Validate\\": ""

tests/unitary-test.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,21 @@
66
*/
77
use MaplePHP\Unitary\Unit;
88

9-
if (!class_exists(Unit::class)) {
10-
$dir = realpath(dirname(__FILE__)."/..");
11-
if(is_file("$dir/vendor/autoload.php")) {
12-
require_once("$dir/vendor/autoload.php");
13-
} else {
14-
die("Please run 'composer install' before running the example test suite");
15-
}
16-
}
179

1810
// If you add true to Unit it will run in quite mode
1911
// and only report if it finds any errors!
20-
$unit = new Unit(true);
12+
$unit = new Unit();
2113

2214
// Add a title to your tests (not required)
23-
$unit->addTitle("Testing MaplePHP Unitary library!");
15+
$unit->addTitle("Testing MaplePHP validation library!");
16+
2417
$unit->add("Checking data type", function($inst) {
2518

2619
$inst->add("Lorem ipsum dolor", [
2720
"string" => [],
2821
"length" => [1,200]
2922

30-
])->add(92928, [
23+
])->add(1221, [
3124
"int" => []
3225

3326
])->add("Lorem", [

0 commit comments

Comments
 (0)