You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Unitary will, by default, find all files prefixed with "unitary-" recursively fr
38
38
39
39
Start by creating a test file with a name that starts with "unitary-", e.g., "unitary-lib-name.php". You can place the file inside `tests/unitary-lib-name.php` for example.
40
40
41
-
**Note: All of your library classes should be automatically be autoloaded when used in test file!**
41
+
**Note: All of your library classes should be automatically be autoloaded if you are using composers autoloader inside your test file!**
42
42
43
43
```php
44
44
<?php
@@ -74,14 +74,14 @@ $unit->add("Checking data type", function($inst) {
74
74
75
75
$unit->execute();
76
76
```
77
-
The example above uses both built-in validation and custom validation (see below for all built-in validation options).
77
+
The example above uses both built-in validation and custom validation (see below for all built-in validation options).
78
78
79
79
### 2. Run the Tests
80
80
81
81
Now you are ready to execute the tests. Open your command line of choice, navigate (cd) to your project's root directory (where your `composer.json` file exists), and execute the following command:
82
82
83
83
```bash
84
-
./vendor/bin/unitary
84
+
php vendor/bin/unitary
85
85
```
86
86
87
87
And that is it. Your tests have been successfully executed.
@@ -97,15 +97,15 @@ You can change the default root testing path and exclude files or whole director
97
97
The path argument takes both absolute and relative paths. The command below will find all tests recursively from the "tests" directory.
98
98
99
99
```bash
100
-
./vendor/bin/unitary --path="./tests/"
100
+
php vendor/bin/unitary --path="./tests/"
101
101
```
102
102
103
103
#### 2. Exclude Specific Files or Directories
104
104
105
105
The exclude argument will always be a relative path from the `--path` argument's path.
0 commit comments