make the default id be the timestamp of the comic
This commit is contained in:
parent
c8e0c0220d
commit
8d526abe32
@ -25,6 +25,8 @@ class Comic {
|
|||||||
$this->{$key} = $value;
|
$this->{$key} = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($this->id) && isset($this->date)) { $this->id = $this->date; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +19,8 @@ class TestComic extends PHPUnit_Framework_TestCase {
|
|||||||
array("2006-01-01.txt"),
|
array("2006-01-01.txt"),
|
||||||
array(new Comic(array('date' => '2006-01-01',
|
array(new Comic(array('date' => '2006-01-01',
|
||||||
'title' => '2006-01-01',
|
'title' => '2006-01-01',
|
||||||
'copy' => "")))
|
'copy' => "",
|
||||||
|
'id' => strtotime('2006-01-01'))))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user