Example #1
0
 /**
  * @test
  * @expectedException \Remotelyliving\PlumbusPhp\Exceptions\OutOfSchleemException
  */
 public function smoothDinglebopWithSchleemUsedUp()
 {
     $schleem = $this->createMock(Schleem::class);
     $schleem->method('isUsedUp')->willReturn(true);
     $this->_dinglebop->expects($this->never())->method('handleSmoothing');
     $this->_sut->smoothDinglebopWithSchleem($this->_dinglebop, $schleem);
 }
 /**
  * @return \Remotelyliving\PlumbusPhp\Plumbus
  */
 public function make()
 {
     $dinglebop = new DingleBop();
     // re-purpose schleem
     try {
         $this->_schleem = $this->_blamf->smoothDinglebopWithSchleem($dinglebop, $this->_schleem);
     } catch (OutOfSchleemException $e) {
         $this->_schleem = $this->_blamf->smoothDinglebopWithSchleem($dinglebop, new Schleem());
     }
     $grumbo = new Grumbo();
     $grumbo->push($dinglebop);
     $this->_blamf->rubDinglebopWithFleeb($grumbo->dinglebop, $this->_fleeb);
     $this->_schlami->rubDingleBop($grumbo->dinglebop);
     $this->_schlami->spitOnDingleBop($grumbo->dinglebop);
     $this->_blamf->cutFleeb($this->_fleeb);
     $this->_blamf->rubAgainstTheChumbles($grumbo);
     $this->_blamf->shavePloobis($grumbo);
     return new Plumbus($this->_blamf->shaveGrumboAway($grumbo));
 }
 /**
  * @Given the schleem is then repurposed for later batches
  */
 public function theSchleemIsThenRepurposedForLaterBatches()
 {
     $schleem = $this->_blamf->smoothDinglebopWithSchleem(new DingleBop(), new Schleem());
     Assert::assertFalse($schleem->isUsedUp());
 }