szurubooru/tests/ModelTests/PropertyModelTest.php
Marcin Kurczewski 8aa499a0b9 Fixed automatic featuring post
- Fixed main page view
- Code moved from StaticPagesController to PostModel
- Code split into semantically meaningful methods
- Allowed anonymous featuring through API
- Added protection against automatic featuring of hidden post
2014-05-11 23:43:35 +02:00

21 lines
501 B
PHP

<?php
class PropertyModelTest extends AbstractTest
{
public function testGetAndSet()
{
$this->assert->doesNotThrow(function()
{
PropertyModel::set(PropertyModel::FeaturedPostId, 100);
});
$this->assert->areEqual(100, PropertyModel::get(PropertyModel::FeaturedPostId));
}
public function testGetAndSetWithArbitraryKeys()
{
$this->assert->doesNotThrow(function()
{
PropertyModel::set('something', 100);
});
$this->assert->areEqual(100, PropertyModel::get('something'));
}
}