예제 #1
0
 public function testStartsWith()
 {
     $this->assertTrue($this->_sut->startsWith('something', 'some'));
     $this->assertTrue($this->_sut->startsWith('some', 'some'));
     $this->assertFalse($this->_sut->startsWith(array(), 'some'));
     $this->assertFalse($this->_sut->startsWith('some', array()));
 }
 public function testBootException()
 {
     $this->setExpectedException('RuntimeException', 'hellooo!');
     $this->_mockContainerSupplier->shouldReceive('getServiceContainer')->once()->andThrow(new RuntimeException('hellooo!'));
     $this->_mockBootLogger->shouldReceive('handleBootException')->once();
     $this->_mockBootLogger->shouldReceive('onBootComplete')->once();
     $validator = function ($arg) {
         $stringUtils = new tubepress_util_impl_StringUtils();
         return $stringUtils->startsWith($arg, '<code>');
     };
     $this->_mockBootLogger->shouldReceive('error')->atLeast(1)->with(Mockery::on($validator));
     $this->_bootSettings->shouldReceive('shouldClearCache')->once()->andReturn(false);
     $this->_sut->getServiceContainer();
 }