-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move namespace Change namespace according to new specification. \Go\Zend\Framework * Remove ZF2 specifics and add more tests This will remove zf2 specific namings. These would mitmatch zend framework if you want to use this with ZF3. This will also add another functional test for goaop-warmup. Also add requirement for symfony/console since this is needed for warmup. * Remove visibility from constant to match <7.1 * Add symfony/console as composer suggestion * Add symfony/console to dev requirement This is needed to actually run the functional warmup test
- Loading branch information
1 parent
f99e056
commit 615cfa0
Showing
20 changed files
with
138 additions
and
51 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 @@ | ||
/vendor/ | ||
composer.lock | ||
|
||
# Test specific ignores | ||
tests/resources/cache |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Go\Zend\Framework\Tests\Advice; | ||
|
||
/** | ||
* @package Go\Zend\Framework\Tests\Advice | ||
*/ | ||
class TestAdvice | ||
{ | ||
public function getTest($parameter) | ||
{ | ||
} | ||
} |
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,13 +1,21 @@ | ||
<?php | ||
|
||
namespace Go\ZF2\GoAopModule\Tests\Aspect; | ||
namespace Go\Zend\Framework\Tests\Aspect; | ||
|
||
use Go\Aop\Aspect; | ||
use Go\Aop\Intercept\MethodInvocation; | ||
use Go\Lang\Annotation\Around; | ||
|
||
/** | ||
* @package Go\ZF2\GoAopModule\Tests\Aspect | ||
* @package Go\Zend\Framework\Tests\Aspect | ||
*/ | ||
class TestAspect implements Aspect | ||
{ | ||
|
||
/** | ||
* @param MethodInvocation $invocation | ||
* @Around("execution(public Go\Zend\Framework\Tests\Advice\TestAdvice->get*(*))") | ||
*/ | ||
public function aspectAdvice(MethodInvocation $invocation) | ||
{ | ||
} | ||
} |
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,45 @@ | ||
<?php | ||
|
||
namespace Go\Zend\Framework\Tests\Functional; | ||
|
||
use Go\Zend\Framework\Console\Command\WarmupCommand; | ||
use PHPUnit\Framework\TestCase; | ||
use Prophecy\Argument; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Console\Input\Input; | ||
use Symfony\Component\Console\Input\InputArgument; | ||
use Symfony\Component\Console\Input\InputDefinition; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* @package Go\Zend\Framework\Tests\Functional | ||
*/ | ||
class WarmupTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function itShouldFindAdviceAccordingToConfig() | ||
{ | ||
$input = $this->prophesize(InputInterface::class); | ||
$input->bind(Argument::any())->willReturn(); | ||
$input->isInteractive()->willReturn(false); | ||
$input->hasArgument(Argument::any())->willReturn(false); | ||
$input->validate()->willReturn(); | ||
|
||
$input->getArgument('applicationConfig') | ||
->willReturn(__DIR__ . '/../resources/application_config.php'); | ||
|
||
$output = $this->getMockBuilder(OutputInterface::class) | ||
->setMethods(['writeln']) | ||
->getMockForAbstractClass(); | ||
|
||
$output->expects($this->at(1)) | ||
->method('writeln') | ||
->with('Total <info>1</info> files to process.'); | ||
|
||
$command = new WarmupCommand(); | ||
$command->run($input->reveal(), $output); | ||
} | ||
} |
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
Oops, something went wrong.