-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for compiler extension tasks section
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
extensions: | ||
cronner: stekycz\Cronner\DI\CronnerExtension | ||
|
||
services: | ||
fooService: stekycz\Cronner\tests\objects\FooService | ||
|
||
|
||
cronner: | ||
tasks: | ||
- stekycz\Cronner\tests\objects\SimpleTestObjectWithDependency(@fooService) | ||
- stekycz\Cronner\tests\objects\AnotherSimpleTestObjectWithDependency(@fooService) |
20 changes: 20 additions & 0 deletions
20
tests/CronnerTests/objects/AnotherSimpleTestObjectWithDependency.php
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,20 @@ | ||
<?php | ||
|
||
namespace stekycz\Cronner\tests\objects; | ||
|
||
use Nette\Object; | ||
|
||
class AnotherSimpleTestObjectWithDependency extends Object | ||
{ | ||
|
||
public function __construct(FooService $service) | ||
{ | ||
} | ||
|
||
/** | ||
* @cronner-task | ||
*/ | ||
public function run() | ||
{ | ||
} | ||
} |
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 | ||
|
||
namespace stekycz\Cronner\tests\objects; | ||
|
||
class FooService | ||
{ | ||
|
||
public function __construct() | ||
{ | ||
} | ||
|
||
} | ||
|
21 changes: 21 additions & 0 deletions
21
tests/CronnerTests/objects/SimpleTestObjectWithDependency.php
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,21 @@ | ||
<?php | ||
|
||
namespace stekycz\Cronner\tests\objects; | ||
|
||
use Nette\Object; | ||
|
||
class SimpleTestObjectWithDependency extends Object | ||
{ | ||
|
||
public function __construct(FooService $service) | ||
{ | ||
} | ||
|
||
/** | ||
* @cronner-task | ||
*/ | ||
public function run() | ||
{ | ||
} | ||
} | ||
|