Example #1
0
 /**
  * @test
  */
 public function rubAgainsTheChumbles()
 {
     $grumbo = new Grumbo();
     $this->_dinglebop->method('wasSmoothedWithSchleem')->willReturn(true);
     $grumbo->push($this->_dinglebop);
     $this->_sut->rubAgainstTheChumbles($grumbo);
     $this->assertEquals(Grumbo::CHUMBLE_PER_GRUMBO_COUNT, count($grumbo->chumbles));
     foreach ($grumbo->chumbles as $chumble) {
         $this->assertInstanceOf(Chumble::class, $chumble);
     }
 }
 /**
  * @Then they push it through the grumbo where the fleeb is rubbed against it
  */
 public function theyPushItThroughTheGrumboWhereTheFleebIsRubbedAgainstIt()
 {
     $this->_grumbo = new Grumbo();
     $this->_grumbo->push($this->_dingle_bop);
     $this->_blamf->rubDinglebopWithFleeb($this->_grumbo->dinglebop, new Fleeb(new FleebJuice()));
     Assert::assertSame($this->_dingle_bop, $this->_grumbo->dinglebop);
 }
 /**
  * @test
  */
 public function extractDinglebop()
 {
     $dinglebop = $this->createMock(DingleBop::class);
     $dinglebop->method('wasSmoothedWithSchleem')->willReturn(true);
     $this->_sut->push($dinglebop);
     unset($this->_sut->ploobis);
     $this->_blamf->rubAgainstTheChumbles($this->_sut);
     $this->assertInstanceOf(DingleBop::class, $this->_sut->extractDinglebop());
 }
 /**
  * @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));
 }
Example #5
0
 /**
  * @param \Remotelyliving\PlumbusPhp\Models\Grumbo $grumbo
  *
  * @return \Remotelyliving\PlumbusPhp\Models\DingleBop
  */
 public function shaveGrumboAway(Grumbo $grumbo)
 {
     return $grumbo->extractDinglebop();
 }