-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from nazg-hack/feature/added-namespace
added namespace NazgTest
- Loading branch information
Showing
24 changed files
with
82 additions
and
40 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
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
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
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
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
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
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<?hh // strict | ||
|
||
namespace NazgTest; | ||
|
||
type IndexStructure = shape('language' => string, 'version' => string); |
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
<?hh // strict | ||
|
||
namespace NazgTest; | ||
|
||
use Ytake\HHContainer\FactoryContainer; | ||
use Ytake\HHContainer\ServiceModule; | ||
|
||
class TestingServiceModule extends ServiceModule { | ||
public function provide(FactoryContainer $container): void { | ||
$container->set(stdClass::class, $container ==> new stdClass()); | ||
$container->set( | ||
\IndexAction::class, | ||
$container ==> new \IndexAction() | ||
\NazgTest\Action\IndexAction::class, | ||
$container ==> new \NazgTest\Action\IndexAction() | ||
); | ||
$container->set( | ||
\NazgTest\Action\ParameterAction::class, | ||
$container ==> new \NazgTest\Action\ParameterAction() | ||
); | ||
$container->set( | ||
\ParameterAction::class, | ||
$container ==> new \ParameterAction() | ||
\NazgTest\Action\ValidateAction::class, | ||
$container ==> new \NazgTest\Action\ValidateAction() | ||
); | ||
$container->set( | ||
\ValidateAction::class, | ||
$container ==> new \ValidateAction() | ||
\NazgTest\Middleware\FakeAttributeMiddleware::class, | ||
$container ==> new \NazgTest\Middleware\FakeAttributeMiddleware() | ||
); | ||
$container->set( | ||
\FakeAttributeMiddleware::class, | ||
$container ==> new \FakeAttributeMiddleware() | ||
\NazgTest\Validation\MockValidateActionFaild::class, | ||
$container ==> new \NazgTest\Validation\MockValidateActionFaild() | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
<?hh | ||
|
||
use Nazg\Foundation\Service; | ||
|
||
return [ | ||
Service::MODULES => ImmVector{ | ||
\TestingServiceModule::class, | ||
\Nazg\Foundation\Service::MODULES => ImmVector{ | ||
\NazgTest\TestingServiceModule::class, | ||
}, | ||
]; |
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,17 +1,18 @@ | ||
<?hh | ||
|
||
use Nazg\Foundation\Service; | ||
use Nazg\Http\HttpMethod; | ||
|
||
return [ | ||
Service::ROUTES => ImmMap { | ||
HttpMethod::GET => ImmMap { | ||
'/' => ImmVector {IndexAction::class}, | ||
\Nazg\Foundation\Service::ROUTES => ImmMap { | ||
\Nazg\Http\HttpMethod::GET => ImmMap { | ||
'/' => ImmVector { | ||
\NazgTest\Action\IndexAction::class | ||
}, | ||
'/testing/{id}' => ImmVector { | ||
FakeAttributeMiddleware::class, | ||
ParameterAction::class, | ||
\NazgTest\Middleware\FakeAttributeMiddleware::class, | ||
\NazgTest\Action\ParameterAction::class, | ||
}, | ||
'/validate/{id}' => ImmVector { | ||
\NazgTest\Action\ValidateAction::class | ||
}, | ||
'/validate/{id}' => ImmVector {ValidateAction::class}, | ||
}, | ||
}, | ||
]; |