Skip to content

Commit

Permalink
Merge pull request #14 from bitExpert/feature/phing
Browse files Browse the repository at this point in the history
Ported bitExpert internal Phing setup over to the disco package.
  • Loading branch information
shochdoerfer committed Dec 4, 2015
2 parents 02b9e9a + c6f5135 commit 600897c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ before_script:
script:
- composer validate
- ./vendor/bin/phing security:check
- ./vendor/bin/phpunit
- ./vendor/bin/phpcs --standard=PSR2 src
- ./vendor/bin/phing sniff
- ./vendor/bin/phing unit

33 changes: 33 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
<?xml version="1.0"?>
<project name="disco" basedir="." default="security:check">
<import file="vendor/bitexpert/phing-securitychecker/build.xml" />

<target name="sniff">
<exec executable="./vendor/bin/phpcs"
passthru="true"
checkreturn="true">
<arg value="--standard=PSR2"/>
<arg path="${phing.dir}/src"/>
<arg path="${phing.dir}/tests"/>
</exec>
</target>

<target name="lint">
<exec executable="php"
passthru="true"
checkreturn="true">
<arg value="-l"/>
<arg path="${phing.dir}/src"/>
</exec>

<exec executable="php"
passthru="true"
checkreturn="true">
<arg value="-l"/>
<arg path="${phing.dir}/tests"/>
</exec>
</target>

<target name="unit">
<exec executable="./vendor/bin/phpunit"
passthru="true"
checkreturn="true">
</exec>
</target>
</project>
18 changes: 12 additions & 6 deletions tests/bitExpert/Disco/AnnotationBeanFactoryUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ public function postProcessorHookRunsAfterLazyBeanCreation()
*/
public function parameterPassedToBeanFactoryGetsInjectedInBean()
{
$this->beanFactory = new AnnotationBeanFactory(BeanConfigurationWithParameters::class, ['test' => 'injectedValue']);
$this->beanFactory = new AnnotationBeanFactory(
BeanConfigurationWithParameters::class,
['test' => 'injectedValue']
);
BeanFactoryRegistry::register($this->beanFactory);

$bean = $this->beanFactory->get('sampleServiceWithParam');
Expand All @@ -236,13 +239,16 @@ public function parameterPassedToBeanFactoryGetsInjectedInBean()
*/
public function nestedParameterKeyPassedToBeanFactoryGetsInjectedInBean()
{
$this->beanFactory = new AnnotationBeanFactory(BeanConfigurationWithParameters::class, [
'test' => [
'nested' => [
'key' => 'injectedValue'
$this->beanFactory = new AnnotationBeanFactory(
BeanConfigurationWithParameters::class,
[
'test' => [
'nested' => [
'key' => 'injectedValue'
]
]
]
]);
);

BeanFactoryRegistry::register($this->beanFactory);

Expand Down

0 comments on commit 600897c

Please sign in to comment.