44
55namespace VasekPurchart \Phing \SymfonyCommand ;
66
7+ use Consistence \Type \Type ;
78use Generator ;
89use PHPUnit \Framework \Assert ;
910use Project ;
@@ -84,10 +85,15 @@ public function testCallCommand(
8485 $ tester = new PhingTester (__DIR__ . '/symfony-command-task-integration-test.xml ' );
8586 $ tester ->executeTarget ($ target );
8687
88+ $ expectedExecutable = $ tester ->getProject ()->getProperty ($ propertyNameWithExpectedExecutable );
89+ $ expectedApp = $ tester ->getProject ()->getProperty ($ propertyNameWithExpectedApp );
90+ Type::checkType ($ expectedExecutable , 'string ' );
91+ Type::checkType ($ expectedApp , 'string ' );
92+
8793 $ tester ->assertLogMessageRegExp (sprintf (
8894 '~executing.+%s.+%s.+hello:world~i ' ,
89- $ tester -> getProject ()-> getProperty ( $ propertyNameWithExpectedExecutable ) ,
90- $ tester -> getProject ()-> getProperty ( $ propertyNameWithExpectedApp )
95+ $ expectedExecutable ,
96+ $ expectedApp
9197 ), $ target , Project::MSG_VERBOSE );
9298 }
9399
@@ -97,9 +103,12 @@ public function testCallCommandWithAppAsExecutable(): void
97103 $ target = 'call-command-with-app-as-executable ' ;
98104 $ tester ->executeTarget ($ target );
99105
106+ $ expectedApp = $ tester ->getProject ()->getProperty ($ target . '.test.app ' );
107+ Type::checkType ($ expectedApp , 'string ' );
108+
100109 $ tester ->assertLogMessageRegExp (sprintf (
101110 '~executing.+%s.+hello:world~i ' ,
102- $ tester -> getProject ()-> getProperty ( $ target . ' .test.app ' )
111+ $ expectedApp
103112 ), $ target , Project::MSG_VERBOSE );
104113 }
105114
0 commit comments