Wanna unit-test a function, but constructor gives error

Solution 1:

As brombeer suggested, new Deal entity requires parameter. This parameter looks like an array, with key 'is_new_today'. So, sth like this below should help with constructor error.

class test extends TestCase
{
    public function testIsNewTodayIsTrue()
    {
        $deal = new Deal(['is_new_today' => true]);
        $deal->setIsForSale(true);
        $this->assertTrue($deal->getIsForSale(), true);
    }
}