Skip to content

Commit

Permalink
[BUGFIX] Functional tests for assistance nodes were not passing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzy committed Jun 22, 2015
1 parent df6b914 commit df9f446
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Classes/M12/Foundation/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ class Package extends BasePackage {
* @return void
*/
public function boot(Bootstrap $bootstrap) {
$signalDispatcher = 'TYPO3\Neos\Service\NodeOperations';
$signalName = 'afterNodeCreate';

// We don't use `NodeOperations` during tests, so listen to original signal from TYPO3CR
if ($bootstrap->getContext()->isTesting()) {
$signalDispatcher = 'TYPO3\TYPO3CR\Domain\Model\Node';
}

$dispatcher = $bootstrap->getSignalSlotDispatcher();
$dispatcher->connect('TYPO3\Neos\Service\NodeOperations', 'afterNodeCreate', 'M12\Foundation\Node\NodeConfigurator', 'afterNodeCreate');
$dispatcher->connect($signalDispatcher, $signalName, 'M12\Foundation\Node\NodeConfigurator', 'afterNodeCreate');
}
}

0 comments on commit df9f446

Please sign in to comment.