-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Pospisil
committed
Dec 9, 2016
1 parent
f9d0dc2
commit 4e972fa
Showing
5 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.idea/ | ||
*~ | ||
tests/tmp | ||
composer.lock | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
use RestServer\Route; | ||
use Tester\Assert; | ||
|
||
require __DIR__.'/bootstrap.php'; | ||
|
||
$route = new Route('/user/<username>/detail', Route::GET, 'x'); | ||
Assert::type('array', $route->match('/user/10/detail', Route::GET)); | ||
|
||
$route = new Route('/user/<username>/detail', Route::GET, 'x'); | ||
Assert::type('array', $route->match('/user/jksdhk.ksjd-dskjlf/detail', Route::GET)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
// The Nette Tester command-line runner can be | ||
// invoked through the command: ../vendor/bin/tester . | ||
|
||
if (@!include __DIR__ . '/../vendor/autoload.php') { | ||
echo 'Install Nette Tester using `composer install`'; | ||
exit(1); | ||
} | ||
|
||
|
||
Tester\Environment::setup(); | ||
date_default_timezone_set('Europe/Prague'); | ||
|
||
|
||
// create temporary directory | ||
define('TEMP_DIR', __DIR__ . '/tmp/' . getmypid()); | ||
@mkdir(dirname(TEMP_DIR)); // @ - directory may already exist | ||
Tester\Helpers::purge(TEMP_DIR); | ||
ini_set('session.save_path', TEMP_DIR); | ||
|
||
|