Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing tests for proposal #804 #805

Merged
merged 2 commits into from
Feb 17, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/testsuite/runtime/om/BaseObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@ public function testSetVirtualColumn()
$this->assertEquals('baz', $b->getVirtualColumn('foo'), 'setVirtualColumn() can modify the value of an existing virtual column');
$this->assertEquals($b, $b->setVirtualColumn('foo', 'bar'), 'setVirtualColumn() returns the current object');
}

public function testSetNewReturnsSelf()
{
$b = new TestableBaseObject();
$this->assertInstanceOf('TestableBaseObject', $b->setNew(false));
$this->assertInstanceOf('TestableBaseObject', $b->setNew(true));
}

public function testSetDeletedReturnsSelf()
{
$b = new TestableBaseObject();
$this->assertInstanceOf('TestableBaseObject', $b->setDeleted(false));
$this->assertInstanceOf('TestableBaseObject', $b->setDeleted(true));
}

public function testResetModifiedReturnsSelf()
{
$b = new TestableBaseObject();
$this->assertInstanceOf('TestableBaseObject', $b->resetModified());
}
}

class TestableBaseObject extends BaseObject
Expand Down