tests/CaptainHook/Runner/ConfiguratorTest.php
/**
     * Tests Configurator::run
     *
     * @expectedException \Exception
     */
Tests Configurator::run
@expectedException \Exception
Tests Configurator :: run @expectedException \ Exception
public function testConfigureFileExists()
    {
        $io     = $this->getIOMock();
        $config = $this->getConfigMock();
        $repo   = $this->getRepositoryMock();
        $runner = new Configurator($io, $config, $repo);
        $config->expects($this->once())->method('isLoadedFromFile')->willReturn(true);
        $io->method('ask')->will($this->onConsecutiveCalls('y', 'y', '\\Foo\\Bar', 'y', 'n'));
        $runner->advanced(true)
               ->run();
    }
public function testConfigureFileExists ( ) { $ io = $ this -> getIOMock ( ) ; $ config = $ this -> getConfigMock ( ) ; $ repo = $ this -> getRepositoryMock ( ) ; $ runner = new Configurator ( $ io , $ config , $ repo ) ; $ config -> expects ( $ this -> once ( ) ) -> method ( 'isLoadedFromFile' ) -> willReturn ( true ) ; $ io -> method ( 'ask' ) -> will ( $ this -> onConsecutiveCalls ( 'y' , 'y' , '\\Foo\\Bar' , 'y' , 'n' ) ) ; $ runner -> advanced ( true ) -> run ( ) ; }
Tests Configurator::run
 @expectedException \Exception
Tests Configurator :: run @expectedException \ Exception