getCommandsByIdentifier() public method

If no Command could be found, an empty array is returned
public getCommandsByIdentifier ( string $commandIdentifier ) : array
$commandIdentifier string command identifier in the format foo:bar:baz
return array
 /**
  * @test
  */
 public function getCommandsByIdentifierReturnsAllCommandsOfTheSpecifiedPackage()
 {
     $mockCommand1 = $this->getMockBuilder(Cli\Command::class)->disableOriginalConstructor()->getMock();
     $mockCommand1->expects($this->atLeastOnce())->method('getCommandIdentifier')->will($this->returnValue('package.key:controller:command'));
     $mockCommand2 = $this->getMockBuilder(Cli\Command::class)->disableOriginalConstructor()->getMock();
     $mockCommand2->expects($this->atLeastOnce())->method('getCommandIdentifier')->will($this->returnValue('otherpackage.key:controller2:command'));
     $mockCommand3 = $this->getMockBuilder(Cli\Command::class)->disableOriginalConstructor()->getMock();
     $mockCommand3->expects($this->atLeastOnce())->method('getCommandIdentifier')->will($this->returnValue('packagekey:controller:command'));
     $mockCommand4 = $this->getMockBuilder(Cli\Command::class)->disableOriginalConstructor()->getMock();
     $mockCommand4->expects($this->atLeastOnce())->method('getCommandIdentifier')->will($this->returnValue('packagekey:controller:othercommand'));
     $mockCommands = [$mockCommand1, $mockCommand2, $mockCommand3, $mockCommand4];
     $this->commandManager->expects($this->once())->method('getAvailableCommands')->will($this->returnValue($mockCommands));
     $expectedResult = [$mockCommand3, $mockCommand4];
     $this->assertSame($expectedResult, $this->commandManager->getCommandsByIdentifier('packagekey'));
 }