/** * @test */ public function it_should_check_if_available() { $availableInThePast = new \DateTime('-2 months'); $this->product->setAvailableOn($availableInThePast); $this->assertTrue($this->product->isAvailable()); $availableInTheFuture = new \DateTime('+2 months'); $this->product->setAvailableOn($availableInTheFuture); $this->assertFalse($this->product->isAvailable()); }