Ejemplo n.º 1
0
 /**
  * @test
  */
 public function isPlumbusable()
 {
     $this->assertFalse($this->_sut->isPlumbusable());
     $this->_sut->setWasRubbedBySchlami(true);
     $this->assertFalse($this->_sut->isPlumbusable());
     $this->_sut->setWasSpatOnBySchlami(true);
     $this->assertFalse($this->_sut->isPlumbusable());
     $this->_sut->handleRubbing(new Fleeb(new FleebJuice()));
     $this->assertFalse($this->_sut->isPlumbusable());
     $this->_sut->handleSmoothing(new Schleem());
     $this->assertTrue($this->_sut->isPlumbusable());
 }
Ejemplo n.º 2
0
 /**
  * @param \Remotelyliving\PlumbusPhp\Models\DingleBop $dingleBop
  * @param \Remotelyliving\PlumbusPhp\Models\Schleem   $schleem
  *
  * @return \Remotelyliving\PlumbusPhp\Models\Schleem
  * 
  * @throws \Remotelyliving\PlumbusPhp\Exceptions\OutOfSchleemException
  */
 public function smoothDinglebopWithSchleem(DingleBop $dingleBop, Schleem $schleem)
 {
     if ($schleem->isUsedUp()) {
         throw new OutOfSchleemException();
     }
     $dingleBop->handleSmoothing($schleem);
     $schleem->markSchleemAsUsed();
     return $schleem;
 }