/** * create dependent objects before running each test **/ public final function setUp() { // run the default setUp() method first parent::setUp(); // create and insert a Profile to own the test Tweet $this->profile = new Profile(null, "@phpunit", "*****@*****.**", "+12125551212"); $this->profile->insert($this->getPDO()); // calculate the date (just use the time the unit test was setup...) $this->VALID_TWEETDATE = new DateTime(); }
/** * create dependent objects before running each test **/ public final function setUp() { // run the default setUp() method first parent::setUp(); // create and insert a Profile to own the test Tweet $this->profile = new Profile(null, "@phpunit", "*****@*****.**", "+12125551212"); $this->profile->insert($this->getPDO()); // create the test Tweet $this->tweet = new Tweet(null, $this->profile->getProfileId(), "PHPUnit favorite test passing"); $this->tweet->insert($this->getPDO()); // calculate the date (just use the time the unit test was setup...) $this->VALID_FAVORITEDATE = new \DateTime(); }