@@ -44,7 +44,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4444 {
4545 $ finder = new Finder ();
4646 $ finder ->files ()
47- ->in (realpath ($ input ->getArgument ('directory ' )));
47+ ->in (realpath ($ input ->getArgument ('directory ' )))-> sortByName ( true ) ;
4848
4949 $ this ->document = new \DOMDocument ('1.0 ' , 'UTF-8 ' );
5050 $ this ->document ->formatOutput = true ;
@@ -67,7 +67,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
6767 foreach ($ finder as $ file ) {
6868 try {
6969 $ xml = new \SimpleXMLElement (file_get_contents ($ file ->getRealPath ()));
70- $ code = json_encode ($ xml );
7170 $ xmlArray = json_decode (json_encode ($ xml ), true );
7271 if (!empty ($ xmlArray )) {
7372 $ this ->addTestSuites ($ baseSuite , $ xmlArray );
@@ -162,21 +161,6 @@ private function addChildElements(array $tree, \DOMElement $element)
162161 $ element ->appendChild ($ child );
163162 }
164163 }
165- private function addAttributeValueToTestSuite (\DOMElement $ element , $ key , $ value )
166- {
167- if (in_array ($ key , $ this ->keysToCalculate )) {
168- $ currentValue = $ element ->hasAttribute ($ key ) ? $ element ->getAttribute ($ key ) : 0 ;
169- $ element ->setAttribute ($ key , (string )($ currentValue + $ value ));
170-
171- if ($ element ->hasAttribute ('parent ' )) {
172- $ parent = $ element ->getAttribute ('parent ' );
173- if (isset ($ this ->domElements [$ parent ])) {
174- $ this ->addAttributeValueToTestSuite ($ this ->domElements [$ parent ], $ key , $ value );
175- }
176- }
177- }
178- }
179-
180164 private function calculateTopLevelStats ()
181165 {
182166 /** @var \DOMElement $topNode */
0 commit comments