|  | @@ 53-67 (lines=15) @@ | 
                                                            
                                    | 50 |  |     /** | 
                                                            
                                    | 51 |  |      * @covers SWP\MultiTenancyBundle\Command\CreateTenantCommand | 
                                                            
                                    | 52 |  |      */ | 
                                                            
                                    | 53 |  |     public function testExecuteWhenCreatingDefaultTenant() | 
                                                            
                                    | 54 |  |     { | 
                                                            
                                    | 55 |  |         $this->command->setContainer($this->getMockContainer()); | 
                                                            
                                    | 56 |  |         $this->commandTester = new CommandTester($this->command); | 
                                                            
                                    | 57 |  |  | 
                                                            
                                    | 58 |  |         $this->commandTester->execute(array( | 
                                                            
                                    | 59 |  |             'command' => $this->command->getName(), | 
                                                            
                                    | 60 |  |             '--default' => true, | 
                                                            
                                    | 61 |  |         )); | 
                                                            
                                    | 62 |  |  | 
                                                            
                                    | 63 |  |         $this->assertRegExp( | 
                                                            
                                    | 64 |  |             '/Tenant Default tenant has been created and enabled!/', | 
                                                            
                                    | 65 |  |             $this->commandTester->getDisplay() | 
                                                            
                                    | 66 |  |         ); | 
                                                            
                                    | 67 |  |     } | 
                                                            
                                    | 68 |  |  | 
                                                            
                                    | 69 |  |     /** | 
                                                            
                                    | 70 |  |      * @expectedException \InvalidArgumentException | 
                                                                                
                                |  | @@ 73-85 (lines=13) @@ | 
                                                            
                                    | 70 |  |      * @expectedException \InvalidArgumentException | 
                                                            
                                    | 71 |  |      * @covers SWP\MultiTenancyBundle\Command\CreateTenantCommand | 
                                                            
                                    | 72 |  |      */ | 
                                                            
                                    | 73 |  |     public function testExecuteWhenDefaultTenantExists() | 
                                                            
                                    | 74 |  |     { | 
                                                            
                                    | 75 |  |         $mockTenant = $this->getMockBuilder('SWP\Component\MultiTenancy\Model\TenantInterface') | 
                                                            
                                    | 76 |  |             ->getMock(); | 
                                                            
                                    | 77 |  |  | 
                                                            
                                    | 78 |  |         $this->command->setContainer($this->getMockContainer($mockTenant)); | 
                                                            
                                    | 79 |  |         $this->commandTester = new CommandTester($this->command); | 
                                                            
                                    | 80 |  |  | 
                                                            
                                    | 81 |  |         $this->commandTester->execute(array( | 
                                                            
                                    | 82 |  |             'command' => $this->command->getName(), | 
                                                            
                                    | 83 |  |             '--default' => true, | 
                                                            
                                    | 84 |  |         )); | 
                                                            
                                    | 85 |  |     } | 
                                                            
                                    | 86 |  |  | 
                                                            
                                    | 87 |  |     /** | 
                                                            
                                    | 88 |  |      * @covers SWP\MultiTenancyBundle\Command\CreateTenantCommand |