public function testTwoNotRelatedChains() { $this->mock->shouldReceive('getElement->getFirst')->once()->andReturn('something'); $this->mock->shouldReceive('getOtherElement->getSecond')->once()->andReturn('somethingElse'); $this->assertEquals('somethingElse', $this->mock->getOtherElement()->getSecond()); $this->assertEquals('something', $this->mock->getElement()->getFirst()); }