Esempio n. 1
0
 public final function setUp()
 {
     // run the default setUp() method first
     parent::setUp();
     // create and insert a Profile
     $password = "******";
     $salt = bin2hex(openssl_random_pseudo_bytes(32));
     $hash = hash_pbkdf2("sha512", $password, $salt, 262144);
     $this->voteProfile = new Profile(null, true, null, "Email", "myName", $hash, 1, "mynameagain", "867", $salt, "yes");
     $this->voteProfile->insert($this->getPDO());
     // create and insert an Image
     $this->voteImage = new Image(null, $this->voteProfile->getProfileId(), "jpeg", "myfile", "theText", null);
     $this->voteImage->insert($this->getPDO());
 }
Esempio n. 2
0
 /**
  * Create dependent objects before running each test
  **/
 public final function setUp()
 {
     //Run the default setUp() method first
     parent::setUp();
     $password = "******";
     $salt = bin2hex(openssl_random_pseudo_bytes(32));
     $verify = $salt;
     $hash = hash_pbkdf2("sha512", $password, $salt, 262144);
     //Create and insert a profile for the follower object
     $this->follower = new Profile(null, true, null, "Email", "myName", $hash, 1, "First", "Last", "867", $salt, $verify);
     $this->follower->insert($this->getPDO());
     $this->followed = new Profile(null, true, null, "Email2", "myName2", $hash, 2, "Given", "Family", "5309", $salt, $verify);
     $this->followed->insert($this->getPDO());
 }
Esempio n. 3
0
 public final function setUp()
 {
     //Run the default setUp() method first
     parent::setUp();
     //Create and insert a Profile to post the test Comment
     $password = "******";
     $salt = bin2hex(openssl_random_pseudo_bytes(32));
     $verify = $salt;
     $hash = hash_pbkdf2("sha512", $password, $salt, 262144);
     $this->profile = new Profile(null, true, null, "Email", "myName", $hash, 1, "First", "Last", "867", $salt, $verify);
     $this->profile->insert($this->getPDO());
     $this->image = new Image(null, $this->profile->getProfileId(), "jpeg", "myfile", "theText", null);
     $this->image->insert($this->getPDO());
     //Calculate the date
     $this->VALID_COMMENTDATE = new \DateTime();
 }
Esempio n. 4
0
 /**
  * Create dependant objects before running each test
  **/
 public final function setUp()
 {
     //Run the default setUp() method first
     parent::setUp();
     //create and insert profile to tag image
     $password = "******";
     $salt = bin2hex(openssl_random_pseudo_bytes(32));
     $verify = $salt;
     $hash = hash_pbkdf2("sha512", $password, $salt, 262144);
     $this->profile = new Profile(null, true, null, "Email", "myName", $hash, 1, "mynameagain", "867", $salt, $verify);
     $this->profile->insert($this->getPDO());
     //create an image to be tagged
     $this->imageTagImage = new Image(null, $this->profile->getProfileId(), "jpeg", "myfile", "theText", null);
     $this->imageTagImage->insert($this->getPDO());
     $this->imageTagTag = new Tag(null, "Photo");
     $this->imageTagTag->insert($this->getPDO());
 }