26 private $fileName =
"<fileName>";
28 private $description =
"<description>";
30 private $treeTableName =
"<treeTableName>";
36 protected function setUp()
38 $this->timestamp = time();
39 $this->upload =
new Upload($this->
id, $this->fileName, $this->description, $this->treeTableName, $this->timestamp);
41 $this->assertCountBefore = \Hamcrest\MatcherAssert::getCount();
44 protected function tearDown()
46 $this->addToAssertionCount(\Hamcrest\MatcherAssert::getCount()-$this->assertCountBefore);
49 public function testGetId()
51 assertThat($this->upload->getId(), is($this->
id));
54 public function testGetFilename()
56 assertThat($this->upload->getFilename(), is($this->fileName));
59 public function testGetDescription()
61 assertThat($this->upload->getDescription(), is($this->description));
64 public function testGetTreeTableName()
66 assertThat($this->upload->getTreeTableName(), is($this->treeTableName));
69 public function testGetTimeStamp()
71 assertThat($this->upload->getTimestamp(), is($this->timestamp));
74 public function testCreateFromTableRow()
77 'upload_pk' => $this->
id,
78 'upload_filename' => $this->fileName,
79 'upload_desc' => $this->description,
80 'uploadtree_tablename' => $this->treeTableName,
81 'upload_ts' => date(
'Y-m-d H:i:s',$this->timestamp)
85 assertThat($upload->getId(), is($this->
id));
86 assertThat($upload->getFilename(), is($this->fileName));
87 assertThat($upload->getDescription(), is($this->description));
88 assertThat($upload->getTreeTableName(), is($this->treeTableName));
89 assertThat($upload->getTimestamp(), is($this->timestamp));
static createFromTable($row)